Files
025-us-states-game/wiki/Install.md
T
Tirsvad f3d740c898 Add screenshots, finish README, add wiki in en, da and ms, re-review MIL-004 (MIL-004)
Task: MIL-004#1
Task: MIL-004#2
Task: MIL-004#3
Task: MIL-004#4
2026-10-13 15:56:35 +08:00

64 lines
1.7 KiB
Markdown

**English** | [Dansk](Install.da) | [Bahasa Melayu](Install.ms)
# Install
Create a local virtual environment named `.venv`, upgrade `pip` and install the project with its test tool.
## Requirements
- Python 3.13 or newer, with `tkinter` (Turtle needs it)
- `git`
- Optional: Doxygen to build the source documentation
## Windows PowerShell
```powershell
git clone https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/025-us-states-game.git
cd 025-us-states-game
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
```
## Linux Debian
```bash
sudo apt install python3 python3-venv python3-tk git
git clone https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/025-us-states-game.git
cd 025-us-states-game
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
```
## MacOS
```bash
git clone https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/025-us-states-game.git
cd 025-us-states-game
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
```
## Run
```bash
python -m us_states_game
```
Type a state name in the prompt; case does not matter. Type `exit` (or press Cancel) to quit. The states you did not name are written to `states_to_learn.csv` in the current folder. Add `--show-coordinates` to print the coordinates of mouse clicks.
![A game in progress: 14 of 50 states named](https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/025-us-states-game/raw/branch/main/docs/images/game-in-progress.png)
## Run the tests
```bash
python -m pytest
```
The tests need no display.