Skip to content

Add a Coin Flip game #1

Description

@pushpam2404

Context

The arcade has four games. Adding a fifth is the easiest way to contribute here,
because you write a brand new file instead of working out how someone else's code
fits together. Nothing you write can break an existing game.

What to change

Create: arcade/games/coinflip.py
Edit: arcade/main.py — add your module to the import line and to the GAMES list

The game: the player calls heads or tails, three times in a row. Get one wrong
and the round ends.

Your file needs exactly three things:

  • NAME — the title shown in the menu
  • DESCRIPTION — one line under the title
  • play() — runs the game and returns a score (higher is better, 0 for a loss)

docs/how-to-add-a-game.md contains a complete
working Coin Flip you can copy and adapt.
Use it.

Acceptance criteria

  • arcade/games/coinflip.py exists with NAME, DESCRIPTION, and play()
  • The game appears in the menu when you run python3 -m arcade
  • It is playable start to finish, both winning and losing
  • It uses ask_choice from arcade.input_utils, not bare input()
  • It uses arcade.art for colour, not raw escape codes
  • tests/test_coinflip.py exists with at least one test
  • python3 -m pytest passes

How to verify locally

python3 -m arcade        # play it, win and lose
python3 -m pytest        # all green

Difficulty

Beginner. No prior knowledge of the codebase needed.


New here? Comment /claim on this issue and a bot will assign it to you. Then read CONTRIBUTING.md.

Stuck at any point? Comment here saying what you have tried, or come to a PR Debug Clinic (Oct 12 or Oct 21). Getting stuck is the normal experience of learning this, not a sign you are doing it wrong.

Activity

  1. added
    enhancementNew feature or request
    good first issueGreat for your very first pull request
    hacktoberfestCounts toward Hacktoberfest 2026
    difficulty: beginnerNo prior knowledge of the codebase needed
    domain: os-devxOpen Source & Developer Experience
    on Oct 1, 2026
  2. github-actions commented on Oct 1, 2026

    @github-actions

    Welcome to GITHUB Community GITAM, and thanks for opening your first issue here.

    A maintainer will get to this within 48 hours. In the meantime:

    • Read CONTRIBUTING.md
    • Want to work on something? Find an issue labelled good first issue and comment /claim on it
    • Stuck on setup? Comment on the issue saying what you have tried. Asking is not failing
  3. PranayVelamala commented on Oct 5, 2026

    @PranayVelamala

    /claim

  4. github-actions commented on Oct 5, 2026

    @github-actions

    Assigned to @PranayVelamala. It is yours.

    Next steps

    1. Fork this repo and clone your fork
    2. git checkout -b fix/short-description
    3. Make the change, commit, push
    4. Open a PR with Closes #1 in the description

    If you get stuck, comment here saying what you have tried. If you change your mind, comment /unclaim — no hard feelings, that is genuinely fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

difficulty: beginnerNo prior knowledge of the codebase neededdomain: os-devxOpen Source & Developer ExperienceenhancementNew feature or requestgood first issueGreat for your very first pull requesthacktoberfestCounts toward Hacktoberfest 2026status: claimedAssigned to a contributor — do not start work on this

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions