Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/lahirumaramba/swift-tictactoe
- Owner: lahirumaramba
- Created: 2016-12-21T23:22:49.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-04T21:58:31.000Z (about 8 years ago)
- Last Synced: 2024-10-29T10:42:35.971Z (2 months ago)
- Language: Swift
- Size: 596 KB
- Stars: 0
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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#.6ydwl7qpzIcon from:
https://www.iconfinder.com/icons/190320/game_red_tac_tic_toe_icon