soccerclient.brain
Class FieldPlayer

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--soccerclient.brain.Player
              |
              +--soccerclient.brain.FieldPlayer
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
Defender, Striker, Testplayer

public class FieldPlayer
extends Player

Fieldplayer This class implements basic methods and attributes of a FieldPlayer It controlls in which state is a player of the team and let him react in respect of the state he is in.

Author:
Christian Pantke, Jan Kästle

Fields inherited from class soccerclient.brain.Player
action, com, field, log, manager, nr, out, pi, playmode, serverName, serverPort, standardPos, startPos, state, teamName, viewmode
 
Fields inherited from class java.lang.Thread
inheritableThreadLocals, MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY, threadLocals
 
Constructor Summary
FieldPlayer(java.lang.String serverName, int serverPort, java.lang.String teamName)
           
 
Method Summary
 void cornerKick(boolean side)
           
 void freeKick(boolean side)
           
 void kickIn(boolean side)
           
 void kickOff(boolean side)
           
 void playing()
          This method is defined exactly in the inherit classes, here it is a blank method.
 void powerGoalKick()
          This method checks the surrounding of the player and then chooses the best way to kick in this situation
 void run()
          this method loops all time long and checks which playmode is current and reacts in respect to this.
(package private)  void staminaRecovery()
          If player has less stamina, he waits till he has enough stamina to play well.
(package private)  void tripple(Coordinate aPos)
          player tripples with the ball to the given Coordinate
 
Methods inherited from class soccerclient.brain.Player
checkIn, directGoalKick, directKick, exactGoalKick, exactKick, getBall, getBallDir, getBallDist, getDirDist, getDist, getFarestFriend, getFutureBall, getNearestEnemy, getNearestFriend, getNormedDirection, goToBall, goToFastBall, goToFastBall, goToPosition, goToPosition, goToPosition, initPos, isBallTimeCurrent, log, lookForBall, pass, resetPos, resetPos, resetPos, resetViewMode, stopBall, turnBodyToObject
 
Methods inherited from class java.lang.Thread
, activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FieldPlayer

public FieldPlayer(java.lang.String serverName,
                   int serverPort,
                   java.lang.String teamName)
Method Detail

run

public void run()
this method loops all time long and checks which playmode is current and reacts in respect to this.
Overrides:
run in class java.lang.Thread

playing

public void playing()
This method is defined exactly in the inherit classes, here it is a blank method.

kickIn

public void kickIn(boolean side)

freeKick

public void freeKick(boolean side)

cornerKick

public void cornerKick(boolean side)

kickOff

public void kickOff(boolean side)

powerGoalKick

public void powerGoalKick()
This method checks the surrounding of the player and then chooses the best way to kick in this situation

staminaRecovery

void staminaRecovery()
If player has less stamina, he waits till he has enough stamina to play well.

tripple

void tripple(Coordinate aPos)
       throws PlayModeException
player tripples with the ball to the given Coordinate
Parameters:
aPos - a Coordinate specifying the destination