We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Tower Breakers
- Discussions
Tower Breakers
Tower Breakers
Sort by
recency
|
378 Discussions
|
Please Login in order to post a comment
i never play a game in whole my life
The question is testing your ability to understand a game...
I had to spend WAY more time thinking about the logic of the game itself than the coding, which makes me question the validity of this as a coding exercise as opposed to an exercise in logic.
Can someone tell me if this is an error in the description or not?
"Player 2 matches the move. Now the towers are both 3 units tall.
Now Player 1 has only one move.
Player 1 removes 2 pieces leaving 1. Towers are 1 and 2 units tall. "
If there is no error in here, why after the move of Player 1, the towers are 1 and 2 units tall instead of 1 and 3?
This can be solved quite simply following this logic.
If n is even, player 2 will create pairs of towers, such that whenever player 1 moves, they make the same move on the towers pair. Since the number of towers is even, this will always result in them winning.
Alternatively, in n is odd, then player 2 only wins if the height of the tower is 1