This project is a command-line version of the classic game Connect Four. It was created as part of the App Academy Open curriculum.
- Command-line interface with grid display
- Cursor navigation to select columns
- Alternating turns between two players, 'X' and 'O'
- Win detection for horizontal, vertical, and diagonal lines
- Tie detection when the grid is full
- JavaScript
- Mocha for testing
- Custom Screen API for command-line rendering
- Clone the repository to your local machine.
- Run
npm install
to install all packages. - Run
node game.js
to start the game. - Use the 'a' and 'd' keys to move the cursor left and right, respectively.
- Press the 's' key to place a move in the current column.
- The game ends when one player has four in a row or the grid is full.
Run mocha
to execute the test suite.
- Add multiplayer over network
- Improve AI for single-player mode