Wednesday, February 3, 2016
Source Code Tic Tac Toe in Java
Game Tic-Tac-Toe've Never heard the name of the game on this one ??? This game is a game often be played right and including games that were popular at the time, following penjelasn more depth:Game tic-tac-toe is a classic game board games manifold (board game) with a 3x3 game board. Board-game is a game with pieces that are placed on, removed from, or moved over a specific surface, specific surface is called a board game (Sigiro, 2011). In a game of tic-tac-toe there are nine rooms (3x3) shaped insulated box (pawn). The game uses two symbols that player X or O. This game starts with filling one of the symbols in one piece, up to three pieces of the same symbol was arranged to form a line diagonally, vertically, or horizontally. The game is usually played by two players, but the computer-based version of the game, the opposing player may be replaced by a computer (Akbar, 2007).In this game the game result obtained in the form of win, lose or draw. The results of the winning game when the symbol of one of the players (player or computer) has been arranged to form a diagonal, vertical or horizontal, while the other players are considered losers. The result of the game is declared the series if the symbol of both puz nothing is arranged to form a line diagonally, vertically or horizontally, as well as all the pieces board game has been loaded. With the artificial intelligence that is able to minimize the possibility for the player (man) win, this game will be very difficult to be won by the player (man). Even the best chances for the player just a series. In other words, using the algorithm, the computer will not be defeated (Gustania, 2011).2.3.1 Rules of the Game Tic-Tac-ToeGame tic-tac-toe this rule (rule) that is used during the game, including the following:1. Large 3x3 board games or more with a series win 3 or more, adjusted to the game board.2. Players in this game are limited to one-on-one, do take turns between the first player (man) and the second player (the computer).3. The human player (player) will be hindered by a computer to achieve the goal (goal) because the computer has been given artificial intelligence so that computers are also trying to be a winner.4. To provide a step, each player must fill in the pieces with the symbols of each player, usually X or O.5. Each player has only one chance at each turn.6. Pawns already filled can not be overwritten by the next step.7. The steps that have been taken can not be canceled or replaced by other measures.8. The purpose of this game is to get a series of three or more same symbols horizontally, vertically or diagonally.9. The winner is determined by the player who first compiled the series.To be clear, the following example of a game of tic-tac-toe:
Example simulation game of tic-tac-toe, for example a human player using the symbol X and a computer using the symbol O.Sample Image Simulation Game Tic-Tac-Toe with Win Condition
Maybe one of you there who does not know the game. Especially in this day and age where technology world is growing very rapidly, so does technology on the game itself. So lying if I did not know the game. But Did you know what the game? The word is derived from the English game which has the basic meaning Game. The game in this case refers to the notion of "intellectual agility" (intellectual playability). Games can also be interpreted as an arena for decision and action of his players. Which is then done with the aim of achieving the target to be achieved.
At first, the game is synonymous with children's games. We always think the game is an activity undertaken by children who can please them.In other words, any form of activity that requires thinking, intellectual agility and achievements against specific targets can be regarded as a game.
Game history
The history of computer gaming technology is directly associated with the development of the computer itself. A computer with high-speed processor, the graphics are closer to reality, and a bigger storage medium is meant to meet the need in playing games.
Before starting, we will first understand what is the meaning of the game (computer games). Game is an interactive game that requires the computer to play. The computer program receives input from the player via the controller and displays the built environment through the TV or monitor screen.The first generation of games
In 1952, at the University of Cambridge, U.S. Douglas wrote a thesis for a degree his PhD on interactions between computers and humans. In his thesis he created a computer game than a traditional game called Tic-Tac-Toe. This game is programmed using the computer EDVAC vacuum tube which has a layer in the form of cathode ray tube (CRT).
Then in 1958 William Haginbotham created the first video game. In contrast to Douglas, the first video game called Tennis for Two was created and played on the oscilloscope.
But the first computer game that is actually created using a real computer is Spacewar. It was in the '60s, the computer is very luxurious goods. And the computer typically used for research purposes in the military. But a man named Steve Russell has an interest in other things. He and his friends are very nge-fan with a science fiction essay entitled Skylark Edward E Smith. From there they made a game called Spacewar. Incidentally also, Steve Russell works using a mainframe computer called the MIT PDP-1 is used for statistical calculations. With a computer that he made Spacewar in 1961.The second generation games
In 1971, Nolan Bushnell along with Ted Dabney created the genre of arcade game first. Named Computer Space, the game was based on Spacewar. In 1972, Nolan and Ted start the Atari computer. Then he developed a game called Pong that is the first game that is available to the public. Because the games previously only existed in the mainframe computer for pleasure alone. The origin of Pong begins when Nolan wants to make the game simple and easy to understand. With micro processor memory and low grade, limited processing capabilities and graphics are simple, he finally made an electronic version of ping pong game which then become Pong.
A bit of a distraction, Pong and then evolved into a game called Breakout. The game was created by Steve Jobs for Atari. From there, Steve Jobs and his friend Steve Wozniak started thinking of creating a PC. Then they borrow all the equipment used in the project Breakout and create a prototype called the Apple I. and it was the forerunner of Apple Macintosh computers that exist today.
In 1980, Atari put out a game called Asteroids and Lunar Lander. The second game is the first game that is registered with the copyright office to obtain a patent. Asteroids is a game full of new innovations in the graphic. Rather than using raster, vector graphics this game is a line as that of the oscilloscope.
The introduction of the Atari Video Computer System (Atari 2600) with ordinary CPU and a slot for the tape, into a new era in the gaming world. In 1980 it also showed increased sales of PCs used for gaming.
And now compete with the engine computer as PS or Xbox console. And the computer not only as an engine for business purposes only, but also for entertainment such as games.
Game development
The following list of game development from the initial issuance of a technology game until now:
1958: Physicist make the first video game that resembles the game of table tennis.
1961: Steve Russel, MIT students create the first interactive computer game called Spacewar.
1966: Ralph Baer created the interactive game using the television.
1971: Nolan Bushnell and Ted Dabney made the arcade version of Spacewar, the Computer Space.
1972: Bushnell and Dabney founded Atari. Atari's first game was Pong.
1975: The first computer game released, the Gunfight.
1976: Coleco released the first video game console called Telstar.
1977: Atari introduced cartridge-based video game known as the Atari 2600.
1978: Atari introduced the trackball in a Football game.
1978: Midway released Space Invaders arcade game which is the first to display the highest score.
1979: Atari console to try to develop a hologram named Cosmos. However, the console was never released.
Asteroid 1979 is the first game to incorporate 3-letter code owner the highest score to be stored in the machine.
1980: Activision become a video game vendor.
1980: 300,000 units of Pac-Man was released by Namco.
1981: Arnie Katz and Num Kunkel publishes a magazine called Electronic Games first game.
1982: Atari releases the Atari 5200 to compete with Coleco.
1983: Nintendo's entry into the Japanese market.
1985: Game Tetris was developed by Russian programmer Alex Pajitnov.
1986: Nintendo NES was released in the United States.
1986: Sega introduced the Sega Master System (SMS) to compete with the NES.
1986: Atari 7800 Atari produces.
1989: Nintendo Game Boy handheld market products.
1991: Nintendo releases Super NES in the United States.
1993: Atari releases the Jaguar, the first 64 bit console on the market.
1994: Sega Saturn and Sony Playstation debuting in Japan.
1995: Sony PlayStation in the US market.
1995: Nintendo released the Nintendo 64 in Japan.
1996: Virtual Pet Tamagotchi Fever hit Japan and the United States.
1997: PlayStation became the most popular game console.
1998: Sega Dreamcast introduced in Japan. This console works on Microsoft Windows CE.
2000: Sony PlayStation 2 was released in the United States and become a new phenomenon.
2000: Game The Sims was released and became the most popular games.
2001: Microsoft introduces Xbox with a built-in hardrive and ethernet port. Nintendo introduced the GameCube and Game Boy Advance.
2004: Sony PSP producing, high-resolution portable console.
2004: Microsoft created the Xbox 360 to compete with Sony.
2006: Nintendo Wii market, a revolutionary game console.
2006: Sony releases the PlayStation 3 console sophisticated but expensive.
2007: Nintendo released Super Mario Galaxy for Wii.
2008: Grand Theft Auto 4 broke the record highest sales in its first week after release.
2008: Wii Fit is marketed so that the users feel the benefits of exercise in the console.
2009: Nintendo Wii Sports became a best-seller video game
Here's the source code in java Tic Tac Toe:
1.) Type the source code to notepad ++
2.) Select language >> java
3.) After that save with TicTacToe.java
Warning !!!!
The class name should be the same as in the public class
only a small error in the writing of one uppercase or lowercase then it can not run at the command prompt
For interfaces can be changed according to your wishes
And to please run the program at a command prompt
with examples:>>cd desktop
>>F: TicTacToe.javac
>> TicTacToe.java
The following attachments source code:
http://downloads.ziddu.com/download/25212946/Tic_tac_toe.txt.html
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment