Skip to content

Tic-Tac-Toe kata performed using TDD and Clean Swift

Notifications You must be signed in to change notification settings

2022-DEV-029/TicTacToe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TicTacToe

About Tic-Tac-Toe

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.

How to run this project?

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.

About this project

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.

Rules

  • 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.

Screenshots

iPhone 12 screenshot:

Initial:

Initial

Win:

Win

Draw:

Draw

References