Skip to content

C++ implementation of the board game Rush Hour (Windows exe download only)

Notifications You must be signed in to change notification settings

SleekPanther/rush-hour-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Rush Hour Game

The classic board game implemented in C++ using OpenGL

Unfortunately I can't compile code for Mac

Demo

Code Notes

  • All board setups are stored in vectors as a list of integers, but can also be read from their respective file
    • 1st line is [number of horizontal vehicles] followed by [number of vertical vehicles]
    • Next number is [length of the special vehicle] (how many coordinate pairs)
    • Then the coordinates of the special vehicle one 1 line (e.g for length=2, coordinates are: x1 y1 x2 y2)
    • Then [length of the 1st horizontal vehicle]
    • Followed by its coordinates
    • Then the vertical vehicles, length followed by their coordinates
  • The current moves & vehicle positions are saved to the progress file: .delete_this_file_if_program_dies
    Sometimes the whole program will crash & vector will go out of bounds if the file is corrupted Simply delete it & the program will create a new one
    • The 1st line in the Progress file is the previous score, all following lines follow the pattern outlined above