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.
I knew that it would always cycle between 2 states, every odd second. But was proven wrong that it doesn't cycle back to the initial state. So you just need to calculate the state at 3,7,11 and so on, and the state at 5,9,13 and so on. And then use (after determining it's not an even second or the 1st second) a state dependent on (n+1)%4==0
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
The Bomberman Game
You are viewing a single comment's thread. Return to all comments →
I knew that it would always cycle between 2 states, every odd second. But was proven wrong that it doesn't cycle back to the initial state. So you just need to calculate the state at 3,7,11 and so on, and the state at 5,9,13 and so on. And then use (after determining it's not an even second or the 1st second) a state dependent on (n+1)%4==0