Class SuperPlayer

java.lang.Object
  |
  +--SuperPlayer

public class SuperPlayer
extends java.lang.Object


Method Summary
 boolean ballInDefA(VisualInfo ballInfo, int playerNumber)
          Decides if the ball is in the area of the player
 boolean ballInOwnHalf(VisualInfo ballInfo)
          Checks if the ball is in the own half of the field
 boolean checkGoodGoalPosition(java.awt.geom.Point2D.Double selfPosition)
          Decides if player is in good position to kick on goal
 boolean checkIfInDefArea(java.awt.geom.Point2D.Double selfPosition, int playerNumber)
          Decides if the player is in his area
 double findSpecialKickDirection(VisualInfo playerInfo1, double turnDir, java.awt.geom.Point2D.Double selfPosition)
          Calculates a special direction for turning or kicking
 java.awt.geom.Point2D.Double getDefAr(int playerNumber)
          Returns the area border of the player
 double getDistance(java.awt.geom.Point2D.Double selfPosition, double x, double y)
          Calculates the distance between player and a fix point
 void searchBall(double directionLastBallInfo, double dirChange, double headAngle)
          Searches the ball
 void setPositionStart(int playerNumber)
          Sets all the players to their start position
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

ballInOwnHalf

public boolean ballInOwnHalf(VisualInfo ballInfo)
Checks if the ball is in the own half of the field
Parameters:
ballInfo - a VisualInfo value which contains all the information about the ball

setPositionStart

public void setPositionStart(int playerNumber)
Sets all the players to their start position
Parameters:
playerNumber - a int value which contains the number of the player

getDefAr

public java.awt.geom.Point2D.Double getDefAr(int playerNumber)
Returns the area border of the player
Parameters:
playerNumber - a int value which contains the number of the player
Returns:
Point2D.Double contains the area border of the player

ballInDefA

public boolean ballInDefA(VisualInfo ballInfo,
                          int playerNumber)
Decides if the ball is in the area of the player
Parameters:
ballInfo - a VisualInfo value which contains current ball information
playerNumber - a int value which contains the number of the player
Returns:
boolean contains true if the ball is in the area of the player

checkIfInDefArea

public boolean checkIfInDefArea(java.awt.geom.Point2D.Double selfPosition,
                                int playerNumber)
Decides if the player is in his area
Parameters:
selfPosition - a Point2D.Double contains the current absolute coordinates of the player
playerNumber - a int value which contains the number of the player
Returns:
boolean contains true if the player is in his area

searchBall

public void searchBall(double directionLastBallInfo,
                       double dirChange,
                       double headAngle)
Searches the ball
Parameters:
directionLastBallInfo - a double value which contains the last known direction of the ball
dirChange - a double value which contains the direction change of the ball
headAngle - double value which contains the head angle of the player

findSpecialKickDirection

public double findSpecialKickDirection(VisualInfo playerInfo1,
                                       double turnDir,
                                       java.awt.geom.Point2D.Double selfPosition)
Calculates a special direction for turning or kicking
Parameters:
playerInfo1 - a VisualInfo contains infos about the closest player of the opponent team
turnDir - a double value which contains normal turn or kick direction
selfPosition - a Point2D.Double contains the current absolute coordinates of the player
Returns:
double the (maybe) modified turn or kick direction

checkGoodGoalPosition

public boolean checkGoodGoalPosition(java.awt.geom.Point2D.Double selfPosition)
Decides if player is in good position to kick on goal
Parameters:
selfPosition - a Point2D.Double contains the current absolute coordinates of the player
Returns:
boolean value is true if player is in good position to kick on goal

getDistance

public double getDistance(java.awt.geom.Point2D.Double selfPosition,
                          double x,
                          double y)
Calculates the distance between player and a fix point
Parameters:
selfPosition - a Point2D.Double contains the current absolute coordinates of the player
x - a double value which contains the x-coordinate of the fix point
y - a double value which contains the y-coordinate of the fix point
Returns:
double value which contains the distance between player and the fix point