21-game

command
v0.0.0-...-c70be9e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2023 License: MIT Imports: 7 Imported by: 0

README

Description

21 is a two player game, the game is played by choosing a number (1, 2, or 3) to be added to the running total.

The game is won by the player whose chosen number causes the running total to reach exactly 21.

The running total starts at zero. One player will be the computer.

Players alternate supplying a number to be added to the running total.

Task

Write a computer program that will:

  • do the prompting (or provide a button menu),
  • check for errors and display appropriate error messages,
  • do the additions (add a chosen number to the running total),
  • display the running total,
  • provide a mechanism for the player to quit/exit/halt/stop/close the program,
  • issue a notification when there is a winner, and
  • determine who goes first (maybe a random or user choice, or can be specified when the game begins).

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL