A terminal-based game where you navigate through a grid to find your lost hat while avoiding holes. This project demonstrates the use of JavaScript classes, user input handling, and basic game mechanics in a command-line environment.
- Ensure you have Node.js installed.
- Clone this repository.
- Run
npm install
to install dependencies. - Execute
node main.js
to start the game.
- You will start in the upper-left corner of the grid.
- Enter one of the following commands to move: N (North), S (South), E (East), W (West).
- The game ends when you find your hat, fall into a hole, or move outside the grid.