The Artima Developer Community
Sponsored Link

Java Answers Forum
Sticks game (i will pay)

8 replies on 1 page. Most recent reply: Nov 26, 2002 4:56 PM by Matt Gerrans

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 8 replies on 1 page
Sly

Posts: 4
Nickname: slybitz
Registered: Nov, 2002

Sticks game (i will pay) Posted: Nov 21, 2002 10:25 AM
Reply to this message Reply
Advertisement
So the teacher I?m helping and also trying to get in internship with wants me to create a game for his students to play when they are done with their busy work. The game he wanted to do is called ?Sticks? (not an applet but a console). The game of Sticks is played as follows:
There are three rows of sticks. Two players take turns making moves. A move consists of picking up and discarding as many sticks as a player desires, as long as all of the sticks picked up by one player during one move are taken from the same row. During each move, the player must pick up at least one stick. The player who picks up the last stick loses the game. So I need to write a Java application program (not an applet) to play a game of Sticks with the user (student). The three rows of sticks should contain four, five, and six sticks respectively at the beginning of the game. The computer is playing against the student user; it can use any strategy to program so long as it obeys the rules.
I would like the program to accept moves typed by the user as input; and also be the "referee" of the game, making sure that the two players strictly alternate taking turns, and checking after each move to see if there is a winner. After each move, the program should print the number of sticks remaining in each row, and announce whose turn is next. When all of the sticks are discarded, then the program should print the number of the winner, offer congratulations, and terminate.
I need to create at least 3 classes. Here?s what I came up with so far:
1) public class Gameboard //here I want to create a constructor of the game board of rows and sticks. Create:
private row1, row2, row3;
//set up Constructor here w/ rows of sticks here
public void subtract_sticks(int row, int sticks)
{//create 2 if statements that give errors if
1)((row <0)||(row>3))
2)(not enough sticks in row to make the specified move)}
2)public class ComputerPlayer //here I want to create a strategy for the computer to use to pick sticks
3)public class HumanPlayer // here is where it keep tracks of students moves etc...

In each turn, the user sends a move command to the board; the board receives the move command. After a move, I want to print the current situation of board. Then calls the referee to check whether the game is over. If yes, finish the game.


I will pay a generous amount for your time and effort. THANKS!!!!


Daniel Ray

Posts: 53
Nickname: budoray
Registered: Oct, 2002

Re: Sticks game (i will pay) Posted: Nov 22, 2002 6:15 AM
Reply to this message Reply
When is this due by?

Sly

Posts: 4
Nickname: slybitz
Registered: Nov, 2002

Re: Sticks game (i will pay) Posted: Nov 22, 2002 11:09 AM
Reply to this message Reply
i need it by November 30th. Does that work?

Sly

Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: Sticks game (i will pay) Posted: Nov 22, 2002 12:04 PM
Reply to this message Reply
How about $5000?

mary

Posts: 5
Nickname: marymary
Registered: Nov, 2002

Re: Sticks game (i will pay) Posted: Nov 22, 2002 12:15 PM
Reply to this message Reply
well, it would be a joint effort from my pal and myself, who are very proficient in java especially consoles - how about $750, much more reasonable than Matt I think....

Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: Sticks game (i will pay) Posted: Nov 22, 2002 3:50 PM
Reply to this message Reply
If you want top-notch work, you've got to pay for it. ;-)

Sly

Posts: 4
Nickname: slybitz
Registered: Nov, 2002

Re: Sticks game (i will pay) Posted: Nov 22, 2002 4:39 PM
Reply to this message Reply
both of you should email me so we can discuss further please (I'd email you but you're email is not listed): larryjbird@hotmail.com
Thanks
Sly

Sly

Posts: 4
Nickname: slybitz
Registered: Nov, 2002

Re: Sticks game (i will pay) Posted: Nov 26, 2002 4:31 PM
Reply to this message Reply
Nevermind this thread further, I wrote the program myself for free!!! HAHAHAHA are you kidding about how much $$ you guys wanted? That is a joke!!!! This program was maybe worth $100-$200 to do. It's not like it's that complicated. I did "top notch work" and it was free. I guess it's better to do stuff yourself. Thanks anyway

Sly

Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: Sticks game (i will pay) Posted: Nov 26, 2002 4:56 PM
Reply to this message Reply
> I guess it's better to do stuff yourself.

Exactly the point.

Flat View: This topic has 8 replies on 1 page
Topic: Java Servlets Previous Topic   Next Topic Topic: two constructor-call parameters to array and to another constructor-call?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use