diff --git a/README.md b/README.md index 031fc76..6fea1f9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ -Simple card game. +# Fire -# Usage +A simple card game. + +## Usage `./fire` @@ -9,3 +11,7 @@ Play a single game. `./stats` Play a number of games and look at the stats. + +`man -l fire.6` + +Read the manual. diff --git a/fire.6 b/fire.6 new file mode 100644 index 0000000..5739568 --- /dev/null +++ b/fire.6 @@ -0,0 +1,41 @@ +.TH FIRE 6 2022-04-07 "1.0" "Card game" + +.SH NAME +fire - a fun card game + +.SH SYNOPSIS +.B ./fire +.br +.B ./stats +[ num_trials ] + +.SH DESCRIPTION +.B fire +simulates a game of cards between Alice and Bob. The game is played with a deck +of cards with multiple suits, and ranks defined in the file +.IR deck . +Each player gets a hand consisting of all the cards of a given suit, and one suit is also distributed in the +.IR prize +pile. This pile is shuffled. + +Each round consists of a card placed faced up from the +.IR prize +pile, after which Alice plays a card of the same rank, and Bob plays a random +card. The player with the highest card adds the rank of the +.IR prize +card to his or her score. When all cards have been played, the game is over, and +the player with the highest score wins. + +.B stats +runs the game a number of times and prints some statistics. + +.SH OPTIONS +None. + +.SH BUGS +None known. + +.SH "SEE ALSO" +.BR shuf (1), +.BR paste (1), +.BR awk (1)