Advanced Search

Browse by Discipline

Scientific Societies

E-print Alerts

Add E-prints

E-print Network

  Advanced Search  

(40 points) This assignment will be programmed individually.

Summary: Homework 4
(40 points)
This assignment will be programmed individually.
So that you don't spend large amounts of time writing code, I have supplied the starter code in Java. I
realize this isn't convenient for everyone, but you should be able to use a C++ subset of Java for what
you are asked to do for this assignment. I use JCreator to run the code. A separate document (posted
with this one) tells you how to download and use JCreator.
Posted on the website is sample code which sets up the game of Liar's dice and plays it with up to six
random players. Study the code to see how it is implemented. Study the posted rules as well so you
see how scoring occurs. In the GUI, you can see the values of both the visible and hidden dice, but
the players do not see the hidden information. The code contains a director for dice images and a
directory of sounds. If you may an illegal bid, you get the donkey sounds. When you extract the data
from Home4.zip, do make sure you retain the directory structure, as the program is expected it.
The Action class records the moves of the game. Basically, your choices are either to increase the
current bid or challenge the current bid. For security purposes, I do not let you keep your own dice, so
you have to tell me what you want to reroll. For ease of programming, you just tell me what NOT to
reroll. For example, if you say keep=6, I make all hidden ones and sixes visible, and reroll the rest. I
realize I have limited your choices, but hopefully, this limitation is reasonable.
class Action{


Source: Allan, Vicki H. - Department of Computer Science, Utah State University


Collections: Computer Technologies and Information Sciences