This is a JavaFX implementation of the classic XO game (also known as Tic Tac Toe). The game is played by two players who take turns marking spaces in a 3x3 grid. The first player to place three of their marks in a row, column, or diagonal wins the game. If all spaces are filled and no player has won, the game ends in a tie.
To run the game, you must have JavaFX installed on your machine. You can download JavaFX from the official website: https://openjfx.io/
Once JavaFX is installed, you can run the game by executing the ticTacToe.java
file in your preferred IDE.
When the game starts, Player 1 (X) will be prompted to make the first move. Player 1 should click on the desired space in the grid to place their mark. Player 2 (O) will then take their turn by clicking on an empty space.
The game will continue until one of the players gets three marks in a row, column, or diagonal, or until all spaces are filled. If a player wins, a message will appear declaring them the winner. If the game ends in a tie, a message will appear declaring the game a draw.
To start a new game, click on the "New Game" button.
XO.mp4
This code was developed by
- @Alaa Wahba
- @Gehad Alaa
- @Roaa Gawish
- @Narden Sobhy
- @Noha Ahmed
- Roaa Morsy
- Eman Mohamed
- Mariam Raafat