Tic-tac-toe, noughts and crosses, or Xs and Os is a paper-and-pencil game for two players who take turns marking the spaces in a three-by-three grid with X or O. The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row is the winner.
For running the project, follow the following steps:
- Make sure you are on a Mac and running Xcode 13.
- Clone this repository via https://github.com/2022-DEV-029/TicTacToe.git.
- Open the file /TicTacToe/TicTacToe.xcodeproj.
- Select TicTacToe as the schema to run and select any of the iPhone simulators available.
This TicTacToe project is made following clean swift architecture and test driven developmemnt(TDD) to run on a Device running iOS 15.4 or later.
- X always goes first.
- Players cannot play on a played position.
- Players alternate placing X’s and O’s on the board until either:
- One player has three in a row, horizontally, vertically or diagonally
- All nine squares are filled.
- If a player is able to draw three X’s or three O’s in a row, that player wins.
- If all nine squares are filled and neither player has three in a row, the game is a draw.
iPhone 12 screenshot:
Initial:
Win:
Draw: