Stick Game

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Katie87
    New Member
    • Oct 2007
    • 9

    #1

    Stick Game

    Hi, I am just starting to learn java and i need to make a game.

    So there are 2 players in the game. We have 5 rows of sticks arranged so that 1st row has 1 stick, the 2nd has 2 sticks, etc. players take turns and can remove as many sticks as they want, and from which ever row. goal is to remove the last stick.
    We need to alternate between both players, print out the game after each turn, and check if the player has won after each turn.
    I am having so much trouble with this, so any help would really be appreciated.
  • Ganon11
    Recognized Expert Specialist
    • Oct 2006
    • 3651

    #2
    Reminds me a lot of this.

    Comment

    • JosAH
      Recognized Expert MVP
      • Mar 2007
      • 11453

      #3
      @OP: in contrast with the other poster, are you allowed to use arrays and/or
      additional methods of your own? Or do you also have to cram everything in one
      single main(String[] args) method without using arrays?

      kind regards,

      Jos

      Comment

      • Katie87
        New Member
        • Oct 2007
        • 9

        #4
        No its actually the exact same thing as the other persons. no arrays allowed

        Comment

        • JosAH
          Recognized Expert MVP
          • Mar 2007
          • 11453

          #5
          Originally posted by Katie87
          No its actually the exact same thing as the other persons. no arrays allowed
          Are you and the other poster related? Same uncle? Home schooled?

          kind regards,

          Jos

          Comment

          • Katie87
            New Member
            • Oct 2007
            • 9

            #6
            No just the same assignment i guess.

            Comment

            • JosAH
              Recognized Expert MVP
              • Mar 2007
              • 11453

              #7
              Originally posted by Katie87
              No just the same assignment i guess.
              Well, closely follow and scrutinize that other thread then.

              kind regards,

              Jos

              Comment

              Working...