Skip to content

Terminal-based chess clock for turn and phase based tabletop games

Notifications You must be signed in to change notification settings

itworks99/hammerclock

Repository files navigation

Hammerclock

A simple TUI chess clock and phase tracker app for tabletop games. It is made with Warhammer40k/Age of Sigmar type of games in mind, but it can be used for any game that requires a timer and phase tracking. Hammerclock Screenshot

Running

By default the application searches for the options file in the current directory. You can specify a different configuration file by using the -c flag.

./hammerclock -o /path/to/config.json

Features

  • Track time for multiple players
  • Track game phases for each player
  • Customizable color palettes
  • Scrollable log panels
  • Keyboard and mouse navigation
  • Customizable game rules

Components

  • Player Panel: Displays player information, time, and action log
  • LogPanel: Provides scrollable log views with scroll indicators
  • StatusPanel: Shows the current game status
  • Clock: Displays the current time
  • AboutPanel: Displays information about the application

Configuration

The configuration file is a JSON file that contains the following fields:

{
"name": "Wh40K 10th Edition",
"default": true,
"playerCount": 2,
"playerNames": [
"Player 1",
"Player 2"
],
"phases": [
"Command Phase",
"Movement Phase",
"Shooting Phase",
"Charge Phase",
"Fight Phase",
"End Phase"
],
"oneTurnForAllPlayers": false,
"colorPalette": "k9s",
"timeFormat": "AMPM"
}

Where:

  • name: The name of the game. This is used to identify the configuration file.
  • default: If true, this configuration file will be used as the default configuration file.
  • playerCount: The number of players in the game. This is used to determine the number of players in the UI.
  • playerNames: The names of the players. This is used to display the player names in the UI. The game supports infinite amount of players and will divide the screen space proportionally. The amount of player names must match the playerCount field.
  • phases: The phases of the game. This is used to display the phases in the UI.
  • oneTurnForAllPlayers: If true, all players will have just one turn skipping the phases.
  • colorPalette: The color palette to use. This is used to display the colors in the UI. The default is k9s. Supported values are k9s, dracula, monokai