GithubHelp home page GithubHelp logo

swiftris's Introduction

Swiftris: Build Your First iOS Game With Swift

This repository maintains the completed source code indicative of the project you may build yourself by completing Bloc's Swiftris book. If you enjoyed Swiftris and would like to read more Bloc books, check out Jottly. Bloc's Jottly book teaches you how to build your very first website using HTML, CSS and the Skeleton framework.

Bloc

At Bloc we offer an iOS apprenticeship in which a skilled professional will guide you as you learn how to build applications for the iOS platform. Our programs are of variable length and tailored for your budget.

Swiftris Tech Details

Swiftris is a Tetris clone written entirely in Swift which employs SpriteKit. It currently builds with Xcode 6.1.1; beta versions of Swift are unsupported.

The organization of this project is as follows:

File Purpose Layer
Array2D.swift A custom Array class which supports a [column, row] subscript for accessing a grid Logic
Block.swift Defines and represents a single square tile on the game board via column, row and color references Logic
Shape.swift A base class which may represent a Tetromino. This class arranges four Block objects in an order defined by its subclasses. It also manages rotation, Logic
SquareShape.swift A subclass of Shape which specifies the placement and rotation of the O Tetromino Logic
LineShape.swift A subclass of Shape which specifies the placement and rotation of the Line Tetromino Logic
SShape.swift A subclass of Shape which specifies the placement and rotation of the S Tetromino Logic
ZShape.swift A subclass of Shape which specifies the placement and rotation of the Z Tetromino Logic
LShape.swift A subclass of Shape which specifies the placement and rotation of the L Tetromino Logic
JShape.swift A subclass of Shape which specifies the placement and rotation of the J Tetromino Logic
TShape.swift A subclass of Shape which specifies the placement and rotation of the T Tetromino Logic
Swiftris.swift This class maintains the game logic. It generates all shapes and tracks level and score Logic
GameViewController.swift The single View Controller responsible for bridging the gap between the Swiftris and GameScene objects. It also responds to several gestures: swipe, pan and tap. Lastly, it updates the score and level labels User Interface
GameScene.swift A subclass of SKScene which is responsible for drawing, redrawing and animating all blocks to and from the game board. It also is responsible for sound playback Visual
Main.storyboard The storyboard provides the view for GameViewController in which the score and level labels are defined Visual

swiftris's People

Contributors

getaaron avatar

Watchers

James Cloos avatar Quanhua Guan avatar

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.