Python implimentation of cluedo
Install dependencies by opening up your favorite terminal and navigating to the root directory and run pip install -r requirements.txt
and then pip install -e .
To start navigate into the src folder and run python3 __main__.py
Your local config file is stored either in:
- Windows:
C:\Users\your_username\Clue\clue.json
- Linux:
~/Clue/clue.json
map
dimentions
x
- The size of the x dimension.
- Minimum:
10
- Maximum:
40
y
: The size of the y dimention.- The size of the y dimension.
- Minimum:
10
- Maximum:
40
tiles
- The tile map used for the game
- Each character has to be referenced once minimum within
simple tiles
orgame tiles
, but not both - Weapons should be referenced only once
- Players should be referenced only once
- Secret doors have to be referenced twice
simple tiles
- Is a list of objects which include
char
andobj
- Has to have a reference for each type of object for
simple tile
char
- The character the object is associated to
- Can be any
simple tile
character used in tiles, not used again in eithersimple tiles
orgame tiles
obj
- Has to be one of the including types
- Types:
none
tile
door
secret door
- Is a list of objects which include
game tiles
- Is a list of objects which include
char
andobj
char
- The character the object is associated to
- Can be any
game tile
character used in tiles, not used again in eithersimple tiles
orgame tiles
obj
- Has to be one of the including types
- Types:
room
weapon
human
ai
name
- The name of the object
- Is a list of objects which include
If you are on windows, install python from https://www.python.org/, be sure to click add to path before clicking install
- Clone the repo
- Open up powershell / terminal
- Navigate to the folder, e.g.
cd F:\Repositories\Clue
- If on windows, run powershell as admin and run
Set-ExecutionPolicy unrestricted
and exit ( there may be a potentially better way, please change if found ) - Create the venv:
python -m venv venv
- Activate the venv:
./venv/bin/activate
(Linux) or./venv/Scripts/activate
(Win) - Run
pip install -r requirements.txt
to install the requirements - In the root directory, run
pip install -e .
Tah-dah, now you can develop code. Your IDE should automatically switch to using the venv, or show a prompt to switch to it, do that and it should run well. PyCharm automatically switches to it, while in VS Code you need to accept it from a prompt.