hosaka check if it works 1 year ago
metro_holografix ono_sendai - wip 1 year ago
ono_sendai about and intro 1 year ago
.gitignore gitignore 11 months ago
.merlin restructured + tests 1 year ago
LICENSE Update LICENSE 1 year ago
README.md readme 1 year ago
makefile restructured + tests 1 year ago

Octopus Carnival

Octpus Carnival is an environment for playing the Machiavelli card game) inside the terminal. It features a solver in order to play against the computer.

Getting Started


The Machiavelli solver is written in Ocaml:

opam install corebuild dune yojson core

The TUI is written in python:

pip3 install --user colorama picotui

The game

In order to play the game first build the solver:

cd octopus_carnival

Then run the executable



Click to play the video.



The folder structure follows a non standard layout for personal reasons.

├── hosaka
│   ├── cards.ml
│   ├── dune
│   ├── dune-project
│   ├── hashset.ml
│   ├── main.ml
│   ├── printer.ml
│   ├── table.ml
│   ├── tcards.ml
│   └── tests.ml
├── makefile
├── metro_holografix
│   ├── cardtypes.py
│   └── scrapes/
├── ono_sendai
│   ├── animation/
│   ├── start
│   ├── state.py
│   ├── symbols.py
│   └── widgets.py
  • hosaka contains the code related to the solver
  • metro_holografix contains the python definitions for the cards and some prototypes
  • ono_sendai contains all the python code related to the game TUI


  • Francesco Mecca - blog


This project is licensed under the GPLv3 License - see the LICENSE.md file for details


Thanks to my friend Daniele that helped me to write the algorithm for the solver.