Skip to content

NukaCola-Quantum/macos2048

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MacOS 2048

Introduction

This is a 2048 style game coding with Swift for MacOS and used SpriteKit as 2-D AppDev Framework.

Files

This project follows the MVC paradigm.

Model: Algri.swift

This file includes the core algorithm of the 2048 game. There are three public methods offered to users.

  • generate() uses to initial the number matrix and update it after every play() executed.
  • play() function exacutes the specific action depends on keyEvents instruction.
  • getvalue() gets back the number matrix and the total score.

View: (Two Scenes) Layout on GameScene.swift, PlayScene.swift

GameScene: Sign in UI

PlayScene: Game playing UI

Replaced numbers in the grid with foreign alphabet images made the game more savor.

Controller: ViewController.swift

Use a simple view controller to controll behaviors of game scenes.

License

2048 game is involved under the MIT LICENSE.

About

2048 game for MacOS code in Swift and use SpriteKit.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages