diff options
author | Pacien TRAN-GIRARD | 2015-11-24 14:28:26 +0100 |
---|---|---|
committer | Pacien TRAN-GIRARD | 2015-11-24 14:28:26 +0100 |
commit | e2354d82e09c3bf8ae472d174332670d2d12f9bb (patch) | |
tree | 92528b9231178fd47c6910163360413d4ae77256 /src/ch/epfl/maze/tests/GhostsTest.java | |
parent | 5f9be99e7ebd4a90e666e6efbe9e9d4b3b8008e7 (diff) | |
download | maze-solver-e2354d82e09c3bf8ae472d174332670d2d12f9bb.tar.gz |
Use Set instead of array for Direction choices
Diffstat (limited to 'src/ch/epfl/maze/tests/GhostsTest.java')
-rw-r--r-- | src/ch/epfl/maze/tests/GhostsTest.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ch/epfl/maze/tests/GhostsTest.java b/src/ch/epfl/maze/tests/GhostsTest.java index 2195443..c6970b1 100644 --- a/src/ch/epfl/maze/tests/GhostsTest.java +++ b/src/ch/epfl/maze/tests/GhostsTest.java | |||
@@ -16,6 +16,8 @@ import ch.epfl.maze.util.Vector2D; | |||
16 | import junit.framework.TestCase; | 16 | import junit.framework.TestCase; |
17 | import org.junit.Test; | 17 | import org.junit.Test; |
18 | 18 | ||
19 | import java.util.Set; | ||
20 | |||
19 | /** | 21 | /** |
20 | * Test suite for ghosts implementation. | 22 | * Test suite for ghosts implementation. |
21 | * | 23 | * |
@@ -126,7 +128,7 @@ public class GhostsTest extends TestCase { | |||
126 | } | 128 | } |
127 | 129 | ||
128 | @Override | 130 | @Override |
129 | public Direction move(Direction[] choices, Daedalus daedalus) { | 131 | public Direction move(Set<Direction> choices, Daedalus daedalus) { |
130 | if (mMoves) { | 132 | if (mMoves) { |
131 | return getPosition().getX() % 2 == 0 ? Direction.RIGHT : Direction.LEFT; | 133 | return getPosition().getX() % 2 == 0 ? Direction.RIGHT : Direction.LEFT; |
132 | } | 134 | } |