Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changed Board.isSolution01() - issue #13
For custom-made boards we don't apply the rule "active robot must ricochet before reaching the goal" as strictly as for the standard Ricochet Robots boards. This is achieved by detecting the "solution in 0 or 1 move" situation only if the active robot stops at the goal in a single move, because there is a wall or another robot behind the goal space. On all standard Ricochet Robots boards there are two walls next to each goal, so this condition is always met and we have to enforce this rule to avoid the trivial single-move solution. But on custom boards the goals can have no walls next to them and then some helper robot(s) are required to reach the goal. In these cases we allow the active robot to move straight to the goal, because moving the helper robot(s) to the required is not a trivial single-move solution.
- Loading branch information