Normally I blog about a program I’ve already written. I decided this time to take a different approach, and blog about a Tic-tac-toe program that I’m writing instead. This will give people who are interested in watching a Swift program evolve over time the chance to follow along. As I add new features and refactor the code, I will post about it on this blog.
The repository is on GitHub:
https://github.com/ijoshsmith/swift-tic-tac-toe
My first committed class is GameBoard. It is the data model that stores the state of a game, namely which positions have been marked with X’s and O’s.
That class’s unit tests are here. The test method naming convention I use is:
test_<method-under-test>_<condition>_<expected-result>
You will need the latest Xcode to build this project.
Enjoy!
Next article: Creating Tic-tac-toe in Swift: Gameplay and data model
Thank you for doing this. Your writing and teaching is very much appreciated!
Thanks Kerry 🙂
Pingback: Dew Drop – November 30, 2015 (#2141) | Morning Dew