|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int index : leftIndexes) { |
|
|
for (int index : leftIndexes) { |
|
|
for (char enemy : enemies) { |
|
|
for (char enemy : enemies) { |
|
|
if (view.data.charAt(index) == enemy) return '<'; |
|
|
|
|
|
|
|
|
if (view.data.charAt(index) == '>') return 'v'; |
|
|
|
|
|
else if (view.data.charAt(index) == enemy) return '<'; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
for (int index : rightIndexes) { |
|
|
for (int index : rightIndexes) { |
|
|
for (char enemy : enemies) { |
|
|
for (char enemy : enemies) { |
|
|
if (view.data.charAt(index) == enemy) return '>'; |
|
|
|
|
|
|
|
|
if (view.data.charAt(index) == '<') return 'v'; |
|
|
|
|
|
else if (view.data.charAt(index) == enemy) return '>'; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|