- Square being painted must be 1 manhattan distance away (game constant)
- Player must have at least 15 stamina (game constant)
- Cell must not be owned by the opposing team
- Cell must not contain a beacon (for some reason this isn’t considered an invalid move by the python code, just a no-op)
- Cell must not contain the max paint (also just a no-op otherwise for some reason, also game constant)
- Decrease player stamina by 15 (game constant)
- Increase paint level on target cell
- Call “claim square” if the cell was previously empty.
- Player must have 10 stamina per prior move + 50 if erasing (game constant)
- Note that a powerup on the player’s current square counts towards this requirement
- Destination cell must either be in a cardinal direction, or both the player’s current and target cells should be beacons that they control
- The destination cell must not be a wall
- If placing a beacon, seven of the 9 squares around the destination cell must be controlled by the player and the destination square must be either owned by the player or neutral after move effects/erase is called
- If the original square contains a powerup, it is consumed and the stamina is added to the player
- Player location is updated
- If the player moved through a beacon, then the destination beacon is replaced with a paint layer (game constant)
- The destination cell’s paint value is set to zero (if this is an erase move) or decreased by one (if this is a normal move and it is the enemy’s paint)
- If the destination cell’s paint value was previously not zero and is now zero, “release square” is called
- If the destination cell contains a powerup, it is consumed and the stamina is added to the player
- If placing a beacon, additionally do the following:
- Reduce paint level for each controlled square in 3x3 area (and call “release square” if the value is now 0)
- Increase paint level for each opponent square in the same area
- Set the target square to a beacon (and call “claim square”)
- player must have made a move
- both players must still be alive
- increase turn count
- switch active player
- spawn powerups
- apply stamina regeneration to the NEW PLAYER. (e.g. if white calls end turn, we give black its regen)