Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mhashim6/2048-oop
object oriented implementation of 2048 game
https://github.com/mhashim6/2048-oop
1024 2048 game java kotlin library oop
Last synced: 26 days ago
JSON representation
object oriented implementation of 2048 game
- Host: GitHub
- URL: https://github.com/mhashim6/2048-oop
- Owner: mhashim6
- License: apache-2.0
- Created: 2018-03-23T17:44:18.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-28T19:57:58.000Z (almost 7 years ago)
- Last Synced: 2024-11-15T07:33:20.752Z (3 months ago)
- Topics: 1024, 2048, game, java, kotlin, library, oop
- Language: Kotlin
- Homepage:
- Size: 46.9 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 2048-OOP
object oriented implementation of 2048 game in ~~java~~ kotlin.check basic implementation in [Sample.kt](https://github.com/mhashim6/2048-OOP/blob/master/src/mhashim6/game1024/Sample.kt).
output snippet (from a loop, not AI):
```
UP
4 4 64 256
8 16 32 128
0 32 16 32
2 4 8 16
-------------------------------------------
RIGHT
0 8 64 256
8 16 32 128
2 32 16 32
2 4 8 16
-------------------------------------------
DOWN
0 8 64 256
2 16 32 128
8 32 16 32
4 4 8 16
-------------------------------------------
LEFT
8 64 256 2
2 16 32 128
8 32 16 32
32 0 0 0
-------------------------------------------
UNDO
0 8 64 256
2 16 32 128
8 32 16 32
4 4 8 16
-------------------------------------------
UP
2 8 64 256
8 16 32 128
4 32 16 32
2 4 8 16
-------------------------------------------
RIGHT
-mhashim6.game1024.exceptions.GameOverException: You Lose!
105 turns in time: 130 ms
```## TODO (hopefully soon):
- Allow for extension, to use in GUI's.