July 2014 20
Video: Making A Game
In this tutorial you’ll make a simple tic-tac-toe game using Swift. See if you can beat the computer in this classic game you played as a kid.
Source code: https://github.com/skipallmighty/Swif…
Algorithm details: http://en.wikipedia.org/wiki/Tic-tac-…
We skip forks and opposite corners of algorithm.
Assets here: http://imgur.com/a/V9xpk
This video was developed by Skip Wilson. You can follow him on Twitter (@SkipAllMighty).
Video: Classes
Classes are general-purpose, flexible constructs that become the building blocks of your program’s code. You define properties and methods to add functionality to your classes by using exactly the same syntax as for constants, variables, and functions.
Unlike other programming languages, Swift does not require you to create separate interface and implementation files for custom classes and structures. In Swift, you define a classin a single file, and the external interface to that class or structure is automatically made available for other code to use.
This video was developed by Skip Wilson. You can follow him on Twitter (@SkipAllMighty).
Video: Structures
Structures are general-purpose, flexible constructs that become the building blocks of your program’s code. You define properties and methods to add functionality to your structures by using exactly the same syntax as for constants, variables, and functions.
Unlike other programming languages, Swift does not require you to create separate interface and implementation files for custom structures. In Swift, you define a structure in a single file, and the external interface to that structure is automatically made available for other code to use.
This video was developed by Skip Wilson. You can follow him on Twitter (@SkipAllMighty).
Video: Functions
Functions are self-contained chunks of code that perform a specific task. You give a function a name that identifies what it does, and this name is used to “call” the function to perform its task when needed.
Swift’s unified function syntax is flexible enough to express anything from a simple C-style function with no parameter names to a complex Objective-C-style method with local and external parameter names for each parameter. Parameters can provide default values to simplify function calls and can be passed as in-out parameters, which modify a passed variable once the function has completed its execution.
Every function in Swift has a type, consisting of the function’s parameter types and return type. You can use this type like any other type in Swift, which makes it easy to pass functions as parameters to other functions, and to return functions from functions. Functions can also be written within other functions to encapsulate useful functionality within a nested function scope.
This video was developed by Skip Wilson. You can follow him on Twitter (@SkipAllMighty).
Video: Introduction
Swift is a new programming language for iOS and OS X apps that builds on the best of C and Objective-C, without the constraints of C compatibility. Swift adopts safe programming patterns and adds modern features to make programming easier, more flexible, and more fun. Swift’s clean slate, backed by the mature and much-loved Cocoa and Cocoa Touch frameworks, is an opportunity to reimagine how software development works.
This video was developed by Skip Wilson. You can follow him on Twitter (@SkipAllMighty).