LinuxCommandLibrary

go-fish

Automate penetration testing tasks and reporting

SYNOPSIS

go-fish [-h] [-n] [num-hands]

PARAMETERS

-h
    Display help summary and exit.

-n
    Disable deck shuffling (for testing or repeatability).

num-hands
    Number of hands to play consecutively (default: 1, max: 10).

DESCRIPTION

go-fish is a simple, text-based implementation of the classic card game Go Fish, designed for Unix-like systems. Players compete against the computer AI to collect complete sets of four matching cards (books) from a standard 52-card deck.

In the game, you and the computer each receive 7 cards initially (or 5 if more than two players, but it's single-player mode). On your turn, request a specific rank from the opponent. If they have it, they give all cards of that rank; otherwise, they say "Go Fish!" and you draw from the deck. Successfully matching a set by drawing or receiving removes those cards from play as a book. The game ends when the deck is empty or a player has no cards, with the winner being the one with the most books.

Interaction is purely keyboard-driven: enter card ranks (A for Ace, 2-10, J, Q, K) to ask for. The program handles shuffling (unless disabled), dealing, and AI decisions. Scores are tallied by books collected. It's ideal for quick sessions, supporting multiple hands in one run. Part of traditional Unix games collections, emphasizing simplicity and nostalgia.

CAVEATS

Single-player only (vs. computer AI); no multiplayer support. AI is basic and predictable. Limited to standard 52-card deck.

GAMEPLAY TIPS

Prioritize asking for ranks you hold multiples of. Track opponent's discards and visible books. Ranks: A,2-10,J,Q,K.

EXIT

Quit anytime with Ctrl+C or EOF (Ctrl+D).

HISTORY

Originated in early Unix game suites (BSD Games collection, circa 1980s). Maintained in Debian/Ubuntu games packages since 1990s; minor updates for portability.

SEE ALSO

blackjack(6), cribbage(6)

Copied to clipboard