Skip to content

eleev/15-puzzle

Repository files navigation

15-puzzle Awesome

Language Framework License

Last Update: 06/April/2019.

If you like the project, please give it a star ⭐ It will show the creator your appreciation and help others to discover the repo.

✍️ About

🧩 Classic 15 Puzzle game for iOS.

📺 Demo

Please wait while the .gif files are loading...

🕹 Controls

  • Swipe anywhere to move the cells
  • Tap ↶ button to shuffle the cells
  • When you solve the puzzle, you will see the corresponding overlay dialog
  • When time exceeds (01:00:00 / 1 hour) or the number of moves will reach it's maximum (10.000) the game will be over

👻 Features

  • Supports both iPhone & iPad
  • Moves counter
  • Timer
  • Solution validator
  • Rendering backend implemented on top of SpriteKit
  • Shuffling
  • Haptic Feedback for supported devices
  • Minimal supported iOS deployment target is 11.0

⏱ Futher Improvements / Current Limitations

  • Only portrait mode
  • Game timer works even when the app is in background (for a while). Ideally it needs to be paused/resumed when entering/resuming the app
  • Missing unit tests coverage, despite the possibility to test most of the code
  • Ideally, the in-game state needs to be modelled by state machines (playing, shuffling, game over and puzzle solved states, and when solver is implemented a new state for solving needs to be modelled as well)
  • Missing solver: can be implemented by using A* or BFS algorithms. Since it's an NP-complete algorithm, it needs to be carefully designed and tested (performance implications)
  • Add macOS target

👨‍💻 Author

Astemir Eleev

🔖 Licence

The project is available under the MIT licence

The project uses assets from kenney.nl under CC0 1.0 Universal (CC0 1.0) Public Domain Dedication licence