Results 1 to 3 of 3
- 10-29-2012, 07:42 AM #1
Member
- Join Date
- Oct 2012
- Posts
- 1
- Rep Power
- 0
Need help with Java program: You Go Last
Hello. I need urgent help with a question I have been given for an assignment. Here is the question.
The game of “You Go Last” is an ancient Tibetan game played with three piles of stones. In this version there are three stones in the first pile, five stones in the second pile and eight stones in the third pile. Two players alternate in taking as many stones as they like from any one pile. Play continues until someone is forced to take the last stone, and in doing so looses the game.
Write a program that will ask for the names of the two players and then keep track of the game of “You Go Last” as they play TWO games. It is important that whoever goes first in the first game doesn’t go first in the second game. The program should not allow a player to make an illegal move, and should tell the player via an error message what they need to do to correct their “mistake”. It will also announce when the game has been won. When both games are over the program should tell the players who won, or if it was a tie (that is, each player won one game each).
An array must be used to hold the values of how many stones are in each pile.
Any suggestions to how I can target this?
Thanks.
- 10-29-2012, 09:54 AM #2
Re: Need help with Java program: You Go Last
Moved from Advanced Java. Please don't post any more beginner homework questions in that section.
This is a forum not a code mill, so show your best efforts and ask a specific question to get help here. As it stands at present, it looks like you are expecting someone to do your homework for you, and that isn't going to happen.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 10-30-2012, 05:27 AM #3
Member
- Join Date
- Oct 2012
- Posts
- 13
- Rep Power
- 0
Similar Threads
-
Call one Java Program from another Java Program
By rajpalparyani in forum New To JavaReplies: 3Last Post: 02-14-2011, 04:13 AM -
Is There A Way To Call Another Java Program Within A Java Program
By SwissR in forum New To JavaReplies: 4Last Post: 07-30-2010, 12:25 PM -
execute java program within java program
By popey in forum New To JavaReplies: 2Last Post: 10-22-2009, 05:32 PM -
How to execute an External Program through Java program
By Java Tip in forum java.ioReplies: 0Last Post: 04-04-2008, 02:40 PM -
How to execute an External Program through Java program
By JavaBean in forum Java TipReplies: 0Last Post: 10-04-2007, 09:33 PM


LinkBack URL
About LinkBacks

Bookmarks