PigPlayer - /* / PigPlayer.java Author: Lewis and Loftus /...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
//******************************************************************** // PigPlayer.java Author: Lewis and Loftus // // Solution to Programming Project 4.4 //******************************************************************** / import java.util.Scanner; import java.util.*; i //========================================================================= // The PigPlayer class represents one player of the game, either the // human player or the computer. Each player tracks his total points // and the points accumulated this round. The player's limit is the // number of points he is willing to accumulate in one round before // passing to the next player. This is dynamic for the human player. //========================================================================= class PigPlayer { public final static int ASK = -1; // prompt for round termination private int total; // total points accumulated in game private int round; // points accumulated in current round private int limit; // pass tolerance
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/17/2011 for the course COP 3530 taught by Professor Davis during the Spring '08 term at University of Florida.

Page1 / 2

PigPlayer - /* / PigPlayer.java Author: Lewis and Loftus /...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online