Skip to content

Solution for the Game of Pig exercise from Go bootcamp

Notifications You must be signed in to change notification settings

one2nc/gameofpig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gameofpig

pig - A command line tool to simulate a game of pig. It is a two-player game played with a 6-sided die.

Usage:
 pig [strategy] [strategy]

Args:
 strategy The number between 1 to 100

Description:
 This command line application accepts two numbers between 1 to 100 as a positional argument. Strategies for player 1 and player 2, and performs the game of pig simulation on it. If no strategies are provided, then it will return an error.

 If the number is out of range, the application will exit with an error message. Otherwise, it will perform the simulation and output the result.

Example usage:

$ pig 10 15
Result: Holding at   10 vs Holding at   15: wins: 3/10 (30.0%), losses: 7/10 (70.0%)

About

Solution for the Game of Pig exercise from Go bootcamp

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages