This is simple game called Tic Tac Toe that build using C. This game have 2 modes : PvP and versus AI. In versus AI mode you have 100% chance winning the game :D. This project made for fulfill final project, basic programming practicum
- Clone this repository. If you dont know how to clone repository, check this out : https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository
- After you done cloning, delete file TicTacToe from your folder, dont delete file TicTacToe.c
- Run code from file TicTacToe.c in your terminal
- Enjoy playing the game ❤️
First of all, you choose game modes. '1' for PvP, '2' for Versus AI
- PvP Mode :
- 1st player symbol is (X)
- 2nd player symbol is (O)
- There's 9 square, each square has a number like this :
| | 0 0 | 0 1 | 0 2 _____|_____|_____ | | 1 0 | 1 1 | 1 2 _____|_____|_____ | | 2 0 | 2 1 | 2 2
- If it's your turn, then type the number according to the square you want
- If you player 1 and you type "0 0" then the (X) will place on square according the information above. Same it goes when you are player 2 the symbol that will place is (O)
- 1 square cannot place 2 symbol, if player 1 or 2 place symbol in same square, the square will just contain first symbol, and the move are gonna be reset for next player ( so don't give wrong input :D )
- If you win / lose / draw there is a message that showing up to tell you
- Versus AI Mode :
- 1st player symbol is (X)
- AI player symbol is (O)
- There's 9 square, each square has a number like this :
| | 0 0 | 0 1 | 0 2 _____|_____|_____ | | 1 0 | 1 1 | 1 2 _____|_____|_____ | | 2 0 | 2 1 | 2 2
- If it's your turn, then type the number according to the square you want
- If you type "0 0" then the (X) will place on square according the information above.
- The AI will automatically place symbol (O) after you type for your move
- 1 square cannot place 2 symbol, if you place symbol in same square, there a message "Pilih Kotak Lain!" its mean "Choose another square". and ask your input again. It will looping until your input is valid, not place in same square.
- If you win / lose / draw there is a message that showing up to tell you
If you have any question or feedback, please do not hesitate to contact me any time [email protected]