Monthly Archives: December 2015

Creating Tic-tac-toe in Swift: User interface

This blog post is the third and final update about my Tic-tac-toe game, written in Swift. The source code is available on GitHub: https://github.com/ijoshsmith/swift-tic-tac-toe The app now has a user interface, which allows you to play against the computer or against another … Continue reading

Posted in Swift, Tic-tac-toe | Tagged , | 1 Comment

Higher-order functions in Swift

This article reviews some very useful higher-order functions available in Swift’s standard library, by showing a simplified implementation of each function. Along the way, I’ll explain how all of the higher-order functions are based on a single loop. Let’s get higher Similar to how a rock … Continue reading

Posted in Swift | Tagged , | 3 Comments

Creating Tic-tac-toe in Swift: Artificial intelligence

This blog post is the second update about my Tic-tac-toe game, being written in Swift. The source code is available on GitHub: https://github.com/ijoshsmith/swift-tic-tac-toe Over the past week I wrote an intelligent agent which implements the Tic-tac-toe strategy devised by Allen Newell and … Continue reading

Posted in Swift, Tic-tac-toe, Uncategorized | Tagged , | 1 Comment