GithubHelp home page GithubHelp logo

tic-tac-toe-swift's Introduction

Tic-Tac-Toe-Swift

Tic-Tac-Toe with minimax algorithm in Swift. I ported this from Objective-C version of this project to learn nuances or changes that are needed in Swift programming for a person coming from extensive Objective-C background.

Below are summary of the changes I experienced while implementing this project

  1. You don’t have to subclass all your classes from NSObject
  2. Immutability is let, Mutability is var. Always start with ‘let'
  3. Yet another block syntax
  4. Use === to compare two object pointers
  5. You no longer need NSDictionary to send more than one value. Swift introduces Tuples to return multiple values
  6. Initialize all your variables in the class before calling super init.

For more details, Please check my blog post here http://bharath2020.in/2015/09/19/porting-to-swift-from-objective-c/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.