This particular variant of Nim involves: Two players alternately take marbles from a pile. In each move, a player chooses how many marbles to take. The player must take at least one but at most half of the marbles. Then the other player takes a turn. The player who takes the last marbles loses. I need to: - Write a program in which a human plays vs a computer - Generate a random int between 10 and 100 to denote initial size of the pile - Generate a random int between 0 and 1 to decide whether the computer or the human takes the first turn - Generate a random int between 0 and 1 to decide whether the computer plays "smart" or "stupid" (calculating moves or choosing randomly)
The problem is that we have to use three classes: Pile, Player, and Game. I have no clue how to get all three classes to "talk" to each other and how to split up what goes where. I am completely lost on how to start this.