Tic Tac Toe Game in Swift 3.0
- 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
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