Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lahirumaramba/swift-tictactoe

Tic Tac Toe Game in Swift 3.0
https://github.com/lahirumaramba/swift-tictactoe

Last synced: 27 days ago
JSON representation

Tic Tac Toe Game in Swift 3.0

Awesome Lists containing this project

README

        

# Swift-TicTacToe
Tic Tac Toe Game in Swift 3.0



# Todo
* Highlight the winning grid items (line)
* Add Game Menu
* Save scores from previous sessions
* Add Human vs Computer gameplay
* If more features are added to the gameplay in the future, if might be worth having separate .swift files for Model and Controller classes
* Use Visual Format Language & NSLayoutConstraint instead of storyboard for main game view
* Write Unit tests

# Note
In this implementation, I used callbacks over delegation. I believe for a simple game application like this using callbacks in Swift (instead of delegates) reduce unnecessary code and provide decoupled, easy to test, and clear code.
This is a good read on the topic: https://medium.cobeisfresh.com/why-you-shouldn-t-use-delegates-in-swift-7ef808a7f16b#.6ydwl7qpz

Icon from:
https://www.iconfinder.com/icons/190320/game_red_tac_tic_toe_icon