From e2354d82e09c3bf8ae472d174332670d2d12f9bb Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Tue, 24 Nov 2015 14:28:26 +0100 Subject: Use Set instead of array for Direction choices --- src/ch/epfl/maze/tests/AnimalTest.java | 6 +++--- src/ch/epfl/maze/tests/GhostsTest.java | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src/ch/epfl/maze/tests') diff --git a/src/ch/epfl/maze/tests/AnimalTest.java b/src/ch/epfl/maze/tests/AnimalTest.java index 67c27e5..0b02442 100644 --- a/src/ch/epfl/maze/tests/AnimalTest.java +++ b/src/ch/epfl/maze/tests/AnimalTest.java @@ -6,10 +6,10 @@ import ch.epfl.maze.util.Vector2D; import junit.framework.TestCase; import org.junit.Test; +import java.util.Set; + /** * Test case for {@code Animal} implementation. - * - * @author EPFL */ public class AnimalTest extends TestCase { @@ -79,7 +79,7 @@ public class AnimalTest extends TestCase { } @Override - public Direction move(Direction[] choices) { + public Direction move(Set choices) { return null; } 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; import junit.framework.TestCase; import org.junit.Test; +import java.util.Set; + /** * Test suite for ghosts implementation. * @@ -126,7 +128,7 @@ public class GhostsTest extends TestCase { } @Override - public Direction move(Direction[] choices, Daedalus daedalus) { + public Direction move(Set choices, Daedalus daedalus) { if (mMoves) { return getPosition().getX() % 2 == 0 ? Direction.RIGHT : Direction.LEFT; } -- cgit v1.2.3