Helvethor / stack-game

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stack Game

This is a simple game.

Rules

  • There are players and a stack (a number).
  • Each player in turn removes a defined amount (within a range) from the stack.
  • The players who empties the stack wins

Dependencies

This program requires python3 and graph-tool to run.

Current State

Incomplete cli interface and no input checking of any sort. Kind of a debug state.

If you want to use this, you'll have to fiddle with the code.

Why

The game is trivial to study in it's simplest form, i. e. 2 players remove between 1 and 3 from the stack. I wanted to see how it behaves when the rules are distorted, so I generated graphs of the possible states through which the game runs with these rules.

This was fun.

About


Languages

Language:Python 95.9%Language:Shell 4.1%