back at it again
Long time no see! Back at it again after a move to a new state, and I’ve got a few updates for ya.
After re-familiarizing myself with the work I’d done prior, I decided to start on some of the easier unfinished tasks that I’d planned before my move. The first I decided to tackle was making the arrows only be able to rotate when a spelunker was on top.
This was the current state of the game - while technically it matches the paper game, I’d like the code to enforce the rules to prevent confusion. At the moment, people could click anywhere to rotate any arrow while it was in the proper phase.
All we had to do was introduce another condition to the if statement which allows the arrows to spin. Since we already wrote a script which allows each room to indicate whether it is occupied, all we have to do is call that boolean from the occupancy check script and if it’s true, allow the arrow to spin. Therefore, limiting their rotation to when spelunkers are on top!
Tossed in some cards and made them selectable.
Then improved upon this by deactivating a card if another is selected.
Did a similar thing for the spelunkers to indicate which is selected, and deselect others if you click another.
Up next will be the biggest rules enforcement challenge of all - trying to get the game to recognize which moves are legal. We’ll see how that goes!