Terminal Games
Simple games that run in the terminal.
|
Simple games that run in the terminal.
Binaries can be found in Releases or, if preferred, CMake can be used to build the project from source either through the PowerShell helper module:
or manually:
Here are the full list of options for Terminal Games:
Checkout the documentation page built using Doxygen and hosted using Github pages.
There is extensive use of ANSI colour escape codes which can be toggled off on the homepage if your terminal does not support them. All major platforms (macOS, Linux and Windows) are supported however due to the use of Windows.h the user experience is much better on Windows.
Feature: Can select whether to use ANSI colour escape codes.
Feature: Pressing the q key on any game screen will show the quit menu.
Supports: 2 players (user vs user), 1 player (user vs computer) and 0 players (computer vs computer).
Features: The arrow keys on Windows or the WASD keys on other platforms can be used to navigate the board.
Note: The computer's choices are random.
Supports: 2 players (user vs user), 1 player (user vs computer) and 0 players (computer vs computer).
Constraints: The word to be guessed must be 3-16 characters long and can only contain letters. Only a single letter can be guessed at a time.
Features: When guessing, you can use the up/down arrow keys on Windows or the W/S keys on other platforms to scroll through the available letters, or press a letter key to select it (please note that pressing q here will show the quit menu).
Note: The computer's choices are random both when guessing letters and when selecting a word to be guessed from the G_HANGMAN_COMPUTER_WORDS variable in Globals.hpp.
Supports: 1 player (user vs computer) and 0 players (computer vs computer).
Features: The arrow keys on Windows or the WASD on other platforms can be used to navigate the board. Selecting ship positions can be done in either an incrementing or decrementing order with respect to the co-ordinates. Backspace on Windows or the Z key on other platforms can be used to undo a ship co-ordinate selection for a ship that has not been completely placed on the board.
Note: The computer's choices are random for both selecting where to place ships and where to attack.
The continuous integration workflow runs against all commits on pull requests, builds the code, runs unit tests and performs linting checks.
The continuous deployment workflow runs against all commits to main, builds the code and deploys the executables as a release.
For development a few extra tools are needed to check for linting issues locally which include the Linters submodule:
The development dependencies are:
All linting helper functions can be found in the Linters submodule.
Any generator can be used to build the project but to prior to running clang-tidy/clang-format CMake must be configured using a generator that creates a compile_commands.json file in the build directory (e.g. -G "Ninja", -G "NMake Makefiles", etc)
On windows, clang-tidy and clang-format can be installed using the LLVM-x.x.x-win64.exe binary from the LLVM release page or from chocolatey using choco install llvm -y.
On Windows, Visual Studio 2022 can be used by opening the folder as a CMake project and Visual Studio Code can be used by opening the folder through the Developer PowerShell for VS (otherwise you may see errors around cl.exe not being found).