diff --git a/src/RumbleBot.java b/src/RumbleBot.java index d7f0dc8..81a7ed7 100644 --- a/src/RumbleBot.java +++ b/src/RumbleBot.java @@ -65,10 +65,10 @@ public class RumbleBot extends Bot - frontIsBlocked = view.data.charAt(frontIndex) == '~' || view.data.charAt(frontIndex) == '#' || view.data.charAt(frontIndex) == 'X'; - backIsBlocked = view.data.charAt(backIndex) == '~' || view.data.charAt(frontIndex) == '#' || view.data.charAt(frontIndex) == 'X'; - leftIsBlocked = view.data.charAt(leftIndex) == '~' || view.data.charAt(frontIndex) == '#' || view.data.charAt(frontIndex) == 'X'; - rightIsBlocked = view.data.charAt(rightIndex) == '~' || view.data.charAt(frontIndex) == '#' || view.data.charAt(frontIndex) == 'X'; + frontIsBlocked = view.data.charAt(frontIndex) == '~' || view.data.charAt(frontIndex) == '#' || view.data.charAt(frontIndex) == 'X' || view.data.charAt(frontIndex) == '^' || view.data.charAt(frontIndex) == '<' || view.data.charAt(frontIndex) == '>' || view.data.charAt(frontIndex) == 'v'; + backIsBlocked = view.data.charAt(backIndex) == '~' || view.data.charAt(frontIndex) == '#' || view.data.charAt(frontIndex) == 'X' || view.data.charAt(frontIndex) == '^' || view.data.charAt(frontIndex) == '<' || view.data.charAt(frontIndex) == '>' || view.data.charAt(frontIndex) == 'v'; + leftIsBlocked = view.data.charAt(leftIndex) == '~' || view.data.charAt(frontIndex) == '#' || view.data.charAt(frontIndex) == 'X' || view.data.charAt(frontIndex) == '^' || view.data.charAt(frontIndex) == '<' || view.data.charAt(frontIndex) == '>' || view.data.charAt(frontIndex) == 'v'; + rightIsBlocked = view.data.charAt(rightIndex) == '~' || view.data.charAt(frontIndex) == '#' || view.data.charAt(frontIndex) == 'X' || view.data.charAt(frontIndex) == '^' || view.data.charAt(frontIndex) == '<' || view.data.charAt(frontIndex) == '>' || view.data.charAt(frontIndex) == 'v'; trapped = frontIsBlocked && backIsBlocked && leftIsBlocked && rightIsBlocked; } }