aigames.soccer.field.constructor
Interface Constructor

All Known Implementing Classes:
StandardConstructor

public interface Constructor

This interface describes classes that are used to create game field shape.

Version:
$Id: Constructor.java,v 1.4 2004/05/08 21:55:30 mwerla Exp $

Method Summary
 FieldPoint[][] getNewField()
          Returns new blank game field.
 java.awt.Point getStartingPosition()
          Returns starting position.
 boolean isGameOverPosition(java.awt.Point position)
          Checks if given position is game over position.
 int isGoalPosition(java.awt.Point position)
          Checks if given position is goal over position.
 

Method Detail

getNewField

public FieldPoint[][] getNewField()
Returns new blank game field.

Returns:
New blank game field.

getStartingPosition

public java.awt.Point getStartingPosition()
Returns starting position.

Returns:
Starting position.

isGameOverPosition

public boolean isGameOverPosition(java.awt.Point position)
Checks if given position is game over position.

Parameters:
position - Position to check.
Returns:
True if given position is game over position, otherwise flase.

isGoalPosition

public int isGoalPosition(java.awt.Point position)
Checks if given position is goal over position.

Parameters:
position - Position to check.
Returns:
-1 (left side) or 1 (right side) if there is a goal, otherwise 0.


Copyright © 2001-2004 MoMaT & MWe Team. All Rights Reserved.