Skip to content

mattmusc/TicTacToeKata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

TicTacToe Kata implementation written in Swift.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages