Skip to content

Latest commit

 

History

History
50 lines (37 loc) · 1.36 KB

README.md

File metadata and controls

50 lines (37 loc) · 1.36 KB

TicTacToe

GitHub license Swift Package Manager

TicTacToe Kata implementation written in Swift.

Rules

The rules of the tic tac toe game are the following:

  • a game has nine fields in a 3x3 grid
  • there are two players in the game (X and O)
  • players take turns taking fields until the game is over
  • a player can take a field if not already taken
  • a game is over when all fields are taken
  • a game is over when all fields in a row are taken by a player
  • a game is over when all fields in a diagonal are taken by a player
  • a game is over when all fields in a column are taken by a player

Details

This is my implementation of the classic game TicTacToe in Swift. Feel free to contact me if you have any suggestions, comments or even just to share some code.

Written in Swift 4.2.

Dependencies:

  • Mustard

How to run and test

  • To run the program in the terminal:
    swift run
  • To build the modules:
    swift build
  • To launch tests:
    swift test

How to generate and Xcode project

swift package generate-xcodeproj