added evading shots
This commit is contained in:
parent
6bea41fdbc
commit
fb2fa8507c
@ -51,13 +51,15 @@ public class RumbleBot extends Bot{
|
||||
|
||||
for (int index : leftIndexes) {
|
||||
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 (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 '>';
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user