Our goal is to create a version of the math game 2048 with a themed spin on it. The theme we are assigned as default is Star Wars, but if we can come up with another theme, it will be an extra 5 points.
The original 2048 can be found here: http://2048game.com/
The Star Wars version we are mimicking is here: https://0x0800.github.io/2048-STARWARS/
I'm only starting to set up my class structure, of which I've determined I need at least 3 things.
- The Game class will handle:
- Game States - currentGame, gameOver (gameWin and gameLost), restartGame
- Current score and best overall score
- The Tile class will handle:
- Tile borders and whether a tile can combine with another tile
- Tile values
- Tile colors/symbols
- The Board class will handle:
- Number of tiles on the board
- Tracking tile positions
- Tracking empty tiles
- Spawning new tiles
There is also an FXML document and a Controller class, since we're using JavaFX and SceneBuilder to create the UI and handle animations, soundFX, and music. Here's a rundown of what the game should have:
- Background music
- Animations
- Sound effects for each piece
- Tile must be abstract
- Must use an interface
- Must correctly keep track of current score, high score, and if the game was won or lost
- Bonus: A HELP function that will highlight possible moves
- Bonus: A theme other than Star Wars
- Bonus: A SWAP (cheat) function to allow for the swapping of two tiles
What I would like to add is an extendable panel that will display the values of the pieces, since we'll be working strictly with symbols. I think I can do so with the Gluon Navigation Drawer, but I'll need to research how it works and make sure it will do what I'm envisioning.
I'll update with my progress as this week goes on. Hopefully, with it being Spring Break for the next week, I'll have plenty of time to get some of the structure hammered out!