• Stars
    star
    202
  • Rank 193,691 (Top 4 %)
  • Language
    Swift
  • License
    MIT License
  • Created over 10 years ago
  • Updated almost 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Tetris clone made in Swift.

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 7.0.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

More Repositories

1

frontend-javascript-exercises

JavaScript exercises for the Front-end Roadmap
JavaScript
39
star
2

workshop-html-css

HTML and CSS exercises for Workshop
Ruby
33
star
3

portfolio-kami

A Jekyll-based Portfolio Theme, view an example at
HTML
26
star
4

mentor-exercises

23
star
5

ios-exercises

Objective-C
15
star
6

bloc-frontend-project-starter

Project starter/base for the roadmap post-repack
JavaScript
11
star
7

portfolio-iro

A Jekyll-based Portfolio Theme
HTML
11
star
8

bloc-jams-source

Source repository for Bloc Jams (Frontend v2 Roadmap)
JavaScript
9
star
9

curriculum-public

This repository maintains public assets used in Bloc curriculum.
Ruby
9
star
10

swiftris-checkpoints

8
star
11

Messenger

This is a small app to message using the Bloc Api
JavaScript
8
star
12

hall_of_fame

A repo for students to practice collaboration
7
star
13

group-sessions

Group Session Content
JavaScript
5
star
14

bloc-jams-angular-source

JavaScript
4
star
15

bloc-jams-student-skeleton

Skeleton for the Bloc's Front-end course's Bloc Jams project
CoffeeScript
4
star
16

bloc-frontend-exercise

A technical frontend interview exercise for Bloc's Design Track students.
JavaScript
4
star
17

base-frontend-project

Clone-able base for Frontend Projects section
JavaScript
4
star
18

android-source

This is where all of the Android related code lives
Java
3
star
19

ios-source-blocstagram

Objective-C
3
star
20

workshop-curriculum

Exercise content for the Workshop platform.
JavaScript
2
star
21

morphing

Become your users
Ruby
2
star
22

Bloc-Jams-AngularJS-Starter

A starter project for Bloc's AngularJS-driven music player app
CSS
2
star
23

population

A Ruby program to analyze U.S. population data
Ruby
2
star
24

bloc-jams

Coded a primitive music player to learn Javascript and JQuery
JavaScript
2
star
25

sep-assignments

Software Engineering Principles skeleton solution files
Ruby
2
star
26

full-stack-blocmetrics

Ruby
2
star
27

blocstrap

Bootstrap for Bloc
Ruby
2
star
28

omniauth-bloc

Omniauth strategy for Bloc
Ruby
1
star
29

bloc-design

Designer Track Portfolios
HTML
1
star
30

bloc-jams-jquery-starter

A starter project for Bloc's jQuery-driven music player app
CSS
1
star
31

trends

Ruby
1
star
32

ios-source-alcolator

Objective-C
1
star
33

workshop-angular-primer

JavaScript
1
star
34

jottly-checkpoints

1
star
35

full-stack-project-starter

Ruby
1
star
36

rails-web-dev-example-collaboration-repo

1
star
37

full-stack-blocmarks

Ruby
1
star
38

bloccit-for-fst-v2

Ruby
1
star
39

open-todo

A very basic Todo app for building an external API
Ruby
1
star
40

spartacus

A Ruby client for the Bloc API
Ruby
1
star
41

address-bloc-bak

A command-line address book written in Ruby.
Ruby
1
star