blob: c168d970071d42fd56cc2546ff2c365fc7a69a74 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
package ch.epfl.maze.physical.zoo;
import ch.epfl.maze.physical.Animal;
import ch.epfl.maze.util.Direction;
import ch.epfl.maze.util.Vector2D;
/**
* Panda A.I. that implements Trémeaux's Algorithm.
*/
public class Panda extends Animal {
/**
* Constructs a panda with a starting position.
*
* @param position Starting position of the panda in the labyrinth
*/
public Panda(Vector2D position) {
super(position);
// TODO
}
/**
* Moves according to <i>Trémeaux's Algorithm</i>: when the panda
* moves, it will mark the ground at most two times (with two different
* colors). It will prefer taking the least marked paths. Special cases
* have to be handled, especially when the panda is at an intersection.
*/
@Override
public Direction move(Direction[] choices) {
// TODO
return Direction.NONE;
}
@Override
public Animal copy() {
// TODO
return null;
}
}
|