1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package aigames.soccer.field.constructor;
21
22 import aigames.soccer.field.FieldPoint;
23
24 import java.awt.Point;
25
26
27 /***
28 * This interface describes classes that are used to create game field shape.
29 * @version $Id: Constructor.java,v 1.4 2004/05/08 21:55:30 mwerla Exp $
30 */
31 public interface Constructor {
32 /***
33 * Returns new blank game field.
34 * @return New blank game field.
35 */
36 public FieldPoint[][] getNewField();
37
38 /***
39 * Returns starting position.
40 * @return Starting position.
41 */
42 public Point getStartingPosition();
43
44 /***
45 * Checks if given position is game over position.
46 * @param position Position to check.
47 * @return True if given position is game over position, otherwise flase.
48 */
49 public boolean isGameOverPosition(Point position);
50
51 /***
52 * Checks if given position is goal over position.
53 * @param position Position to check.
54 * @return -1 (left side) or 1 (right side) if there is a goal, otherwise 0.
55 */
56 public int isGoalPosition(Point position);
57 }