A collection of small games you play in your terminal.
Built as a friendly place to make your first ever pull request.
You need Python 3.10 or newer. Nothing else โ no pip install, no
dependencies, no setup.
git clone https://github.com/github-community-gitam/terminal-arcade.git
cd terminal-arcade
python3 -m arcade _____ _ _
|_ _|__ _ _ _ __ ___(_)_ _ __ _ | |
| |/ -_) '_| ' \/ -_) | ' \/ _` || |
|_|\___|_| |_|_|_\___|_|_||_\__,_||_|
_ ___ ___ _ ___ ___
/_\ | _ \/ __| /_\ | \| __|
/ _ \| / (__ / _ \| |) | _|
/_/ \_\_|_\\___/_/ \_\___/|___|
1. Guess the Number
Find the secret number in as few guesses as you can
2. Hangman
Guess the word before the drawing is finished
3. Rock Paper Scissors
Best of five against the computer
4. Tic Tac Toe
The classic, against a computer that plays at random
5. High scores
6. Quit
What would you like to play?
A repository looks like a lot of folders the first time you open one. Almost none of them are yours to worry about. Here is the honest breakdown.
| Folder | What is in it |
|---|---|
arcade/games/ |
One file per game. Nearly every beginner issue is "add a game" or "fix a game", and it happens in exactly one file in this folder. If you only ever open one directory in this repo, open this one. |
arcade/ |
The shared bits every game uses โ the menu (main.py), the ASCII art (art.py), asking the player questions (input_utils.py), high scores (scoreboard.py). Intermediate issues live here. |
tests/ |
The automated tests. Some issues ask you to add one; tests/test_<name>.py matches arcade/<name>.py. |
| File | Why |
|---|---|
docs/how-to-add-a-game.md |
The single most useful file in the repo. Follow it start to finish and you have a merged PR. |
docs/architecture.md |
How the pieces fit together. Read it when you get curious, not before. |
CONTRIBUTING.md |
The workflow: claim an issue, branch, commit, open a PR. |
You will never need to touch any of these, and nothing in your issue will require it.
| Thing | What it actually is |
|---|---|
.github/ |
Robots. The checks that run on your PR, the issue templates, the bot that assigns you an issue when you comment /claim. Maintainer territory. |
ruff.toml, pyproject.toml |
Settings for the code checker. |
.gitignore |
A list of files Git should not track. |
LICENSE, SECURITY.md, CODE_OF_CONDUCT.md |
Standard paperwork every open source project carries. |
.pytest_cache/, .ruff_cache/, __pycache__/ |
Junk your own computer generates when you run the tests. Already ignored by Git. |
The short version: open an issue, it tells you the file. That file is
almost always in arcade/games/. Everything else is scenery.
This repository exists so you can make your first pull request. That is not marketing. The issues were written specifically for people who have never contributed to open source before.
- Browse issues labelled
good first issue - Comment
/claimon one โ a bot assigns it to you within seconds - Read CONTRIBUTING.md
- Open a pull request with
Closes #<issue number>in the description
| ๐ฎ Add a game | One new file, one line in a list. Step-by-step guide with working code |
| ๐ Fix a bug | There are real bugs in here on purpose. Each issue names the exact file and function |
| โจ Improve a game | Difficulty levels, better ASCII art, an opponent that actually tries to win |
Every issue tells you the file to open, what "done" looks like, and how to check your work. If an issue does not do that, it is our mistake โ say so and we will fix it.
Everything marked ignore is infrastructure. It is listed only so that nothing in the repo looks mysterious.
terminal-arcade/
โโโ arcade/
โ โโโ __main__.py # python -m arcade starts here
โ โโโ main.py # the menu and the list of games
โ โโโ art.py # ASCII banners and colours
โ โโโ input_utils.py # asking the player questions
โ โโโ scoreboard.py # high scores
โ โโโ games/ # โ one file per game. YOUR WORK GOES HERE
โโโ tests/ # pytest โ some issues ask you to add one
โโโ docs/
โ โโโ how-to-add-a-game.md # โ read this first
โ โโโ architecture.md
โ
โโโ .github/ # ignore โ CI checks, issue templates, bots
โโโ ruff.toml # ignore โ code-checker settings
โโโ pyproject.toml # ignore โ packaging metadata
โโโ .gitignore # ignore
โโโ LICENSE # ignore โ MIT
โโโ SECURITY.md # ignore
โโโ CODE_OF_CONDUCT.md # ignore
Two things, and only two:
| Blocks the merge | Why |
|---|---|
| A test fails | Something in tests/ broke. |
| A real bug is found | An undefined variable, an unused import, a mutable default argument โ code that is genuinely wrong. |
Everything else is advice. Formatting never blocks you โ untidy spacing, single quotes instead of double, imports in the wrong order, a missing newline at the end of a file. Those appear as suggestions in the log and are ignored by the gate. Your pull request merges either way.
This is deliberate. Nobody's first contribution should be rejected by a robot over four spaces of whitespace.
Tests need pytest, which is the only thing in this project that does:
python3 -m pip install pytest
python3 -m pytest- Standard library only. Ever. This gets used at events on campus Wi-Fi,
and
pip installfailing must never be why someone cannot take part - One file per game. So contributors never collide with each other
- Every game returns a score from
play(), andmain.pydecides what to do with it - Only
input_utilscallsinput(), so "that is not a number" behaves the same everywhere
More detail in docs/architecture.md.
Maintained by OS & DevX, GITHUB Community GITAM.
| Date | Event |
|---|---|
| Mon, Oct 5 | Open Source Kickoff & Live PR Lab |
| Mon, Oct 12 | PR Debug Clinic #1 โ bring a broken branch |
| Wed, Oct 21 | PR Debug Clinic #2 |