reset password
Author Message
ccruz58
Posts: 16
Posted 22:51 Mar 01, 2015 |

For the token game, what does it mean that the computer takes enough "marbles" to make the size of the pile a power of 2 minus 1? You mean the computer replaces the size of the pile with that random number?

And what does it mean by "This will always be a legal move except when the size of the pile is one less than a power of two."

Won't the pile always be one less than a power of two on hard mode?

Very confused... Can someone clarify and explain what hard mode is supposed to be in simple terms?

Thank you! :)

kknaur
Posts: 540
Posted 09:16 Mar 02, 2015 |

The powers of 2 minus 1 are listed. If the computer is on hard mode and the pile is not already a power of 2 minus 1, the computer will always take enough tokens to reduce it to the next value that is a power of 2 minus 1. Example if there are 100 tokens the computer would remove as many tokens as necessary to reduce the pile to 63.
 

ccruz58
Posts: 16
Posted 18:22 Mar 02, 2015 |

Are we allow to display the size of the tokens for each turn?

kknaur
Posts: 540
Posted 18:43 Mar 02, 2015 |

Yes you should show the size of the pile so the user knows how many are left.

ccruz58
Posts: 16
Posted 19:41 Mar 02, 2015 |

When I'm using scanner for two different methods in order to get two different types of input, I get an error when running the program. So, I have two Scanner objects in each method. If I only have one, it will have a syntax error. I'm completely lost...