Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
    Bookmark Topic Watch Topic
  • New Topic

HELP!! source code for tic tac toe game..  RSS feed

qwerty banana
Posts: 1
  • Mark post as helpful
  • send pies
  • Report post to moderator
ok... can someone help wif this tic tac toe game. itz supposed to be human vs human..
(a)Starting of Game
The TicTacToe game is a board game played between 2 players. The objective of the game is for the player to occupy 3 consecutive cells in a straight line. The cells can be in a vertical, horizontal or diagonal line. Each player will take turns to occupy a cell on the board.
(b)Occupying a cell
Each contestant will click on an available cell in order to occupy it. Consequently, the player�s icon will be displayed in the cell.
(c)Message for each game
For each move in the game, an appropriate message will be displayed. For example, if it is the Player1�s turn to move, then the message box will display the corresponding message �Player 1's turn. No winners yet.�.
If Player2 wins the game, then the message box will display �Player2 wins!�.
(d)Restart game
The players may choose to restart a game and clear the board.
2. Basic Requirements of the TicTacToe Game
You are required to write a program to implement the Game with the following functionalities:

�The board for the game should be at least consists of 3 x 3 cells. You are advised to use a JButton to represent each cell.
�Load the Game with suitable images. That is, there will be an Image for each the player.
�The program will create an ImageIcon for each of player.
�You should have a JButton for each the players to restart the game.
�You should have a TextField to display the message of the game.
�The game is able to detect any winning combination for both players. That is, it is able to detect 3 consecutive cells in a row (vertical, horizontal or diagonal). The game will stop once either player has won.
�The game can be restarted by clicking on the �Restart Game� button and the players can exit by clicking on the �Exit Game� button

so anyone can get me the source code for this??? pls....
Carol Murphy
village idiot
Posts: 1211
  • Mark post as helpful
  • send pies
  • Report post to moderator
Dear Mr|Ms Banana;
This is a working cattle drive forum, and not the place for this sort of request. (Although it sounds like an intesting assignment.)
Our purpose is to help folks learn how to do for themselves, not to do for them. If you truly need help with a coding conundrum AFTER you have come up with some plan of attack, there are other forums where you could appeal for help. Don't expect a complete solution, 'cause that ain't goin' to happen! Also, we do have a naming convention. This isn't your real name, is it?
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!