|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object OOPig
public class OOPig
OOPig
is the main console class for the Pig application. It is typically executed within a terminal (shell) window.
Pig is a folk jeopardy dice game with simple rules: Two players race to reach 100 points. Each turn, a player repeatedly rolls a die until either a 1 ("pig") is rolled or the player holds and scores the sum of the rolls (i.e. the turn total). At any time during a player's turn, the player is faced with two decisions:
Constructor Summary | |
---|---|
OOPig()
|
Method Summary | |
---|---|
static void |
main(java.lang.String[] args)
main - randomly selects whether the user goes first or not, prints which player the user will be, creates a new game with the user and a hold-at-20 player, and starts the game. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OOPig()
Method Detail |
---|
public static void main(java.lang.String[] args)
main
- randomly selects whether the user goes first or not, prints which player the user will be, creates a new game with the user and a hold-at-20 player, and starts the game.
args
- a String[]
value (unused)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |