Fifteen Design
Ideas for what features the Fourteen game and solver should look like.
Guidance
Prioritize the order in which you implement features. Keep a written list so you can check your progress.
- Separate game logic and player control (model/view/logic controller/play controller).
- Visualize history of moves. Allow replay.
Gameplay and Appearance
- DISCUSS - Standardized controls: left/right/up/down arrows slide pieces on the the board. (So the hole moves in the opposite direction.) This allows everyone to pick up and play any game.
- Configurable size.
- Score readout showing number of moves made and the heuristic score of the current configuration.
- Show scores of next possible moves up/down/left/right on the appropriate side of the board.
- Human can move and undo moves.
- Save history of moves.
- Indicate which move return to the previous state in some way. (E.g., by graying it out or crossing it off.)
Game State
Minimize the complexity of your game state. Use a single width * height list of integers to represent the board. You will need to keep
the number of steps, but not the heuristic.
Game Logic
- legal_moves(): List of moves.
- game_over() : boolean
- heuristic(GameState) : Compute an int representing the quality of the current position. Low numbers are better.