ProgrammierMethodik 2002 - RoboCup

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

RCWorld Class Reference

This class is the main component of the Player. More...

Inheritance diagram for RCWorld::

RCPlayMode RCView RCType RCSender RCEventType List of all members.

Public Methods

 RCWorld (RCLog Log)
 Constructor. More...

void setBrain (RCBrain Brain)
 Sets the strategy component of the player. More...

void setDisplay (RCDisplay Display)
 set the visualisation component of the player. More...

synchronized void receiveEvent (LinkedList Events)
 This function get a list full of RCEvent* 's. More...

void calculatePosition ()
RCObject getOurself ()
 get a handle of the current player. More...

Point2D Double getFlag (RCSeeEvent event)
 find and return the abs coordinates for the given flag and left side if you want the coordinates negate x and y. More...

void MessageFilter (RCHearEvent Event)
 analyse and filter messages from server and set the corresponding playmode. More...


Public Attributes

RCObject Ball
 Attributes. More...

RCObject [] Enemies
RCObject [] Friends
RCEvent Event
boolean NewEvent
int PlayerNumber
double X1
double Y1
double X2
double Y2
double angle
double AngleToBall
int AngleToBallTimeStamp
boolean NewData
final String MsgStart = "RCTEAM:"
int GameMode
int Side
RCServerParamEvent ServerParam
RCPlayerParamEvent PlayerParam
RCPlayerTypeEvent PlayerType []
RCSenceEvent SenceBody
RCSeeEvent NearestFlag = null
RCSeeEvent NearestLine = null
boolean ValidPosition = false
int CurrentTimeStamp
RCLog Log

Private Attributes

boolean OutOfField
int OutOfFieldCounter
boolean enableOutOfField
Point2D Double OldPosition
RCDisplay Display
 Associations. More...

RCBrain Brain

Detailed Description

This class is the main component of the Player.

This class analyse the server messages and calculates the for all objects on the field.

Definition at line 83 of file RCWorld.java.


Constructor & Destructor Documentation

RCWorld::RCWorld ( RCLog Log ) [inline]
 

Constructor.

Initialize a new object.

Definition at line 136 of file RCWorld.java.


Member Function Documentation

void RCWorld::MessageFilter ( RCHearEvent Event ) [inline]
 

analyse and filter messages from server and set the corresponding playmode.

Parameters:
Event   the event to filter

Definition at line 710 of file RCWorld.java.

void RCWorld::calculatePosition ( ) [inline]
 

Definition at line 369 of file RCWorld.java.

Point2D Double RCWorld::getFlag ( RCSeeEvent event ) [inline]
 

find and return the abs coordinates for the given flag and left side if you want the coordinates negate x and y.

Parameters:
event   Flag-RCSeeEvent
Returns:
Point

Definition at line 559 of file RCWorld.java.

RCObject RCWorld::getOurself ( ) [inline]
 

get a handle of the current player.

Returns:
ref. to this player

Definition at line 543 of file RCWorld.java.

Referenced by RCViewPort::paint(), RCBrain::shoot(), RCGoalieBrain::update(), and RCBrain::update().

synchronized void RCWorld::receiveEvent ( LinkedList Events ) [inline]
 

This function get a list full of RCEvent* 's.

The function remove and process every event in the list. After the processing the function update the strategy and the display component.

Parameters:
Event   list with events

Definition at line 185 of file RCWorld.java.

Referenced by RCParser::parseHear(), RCParser::parsePlayerParam(), RCParser::parsePlayerType(), RCParser::parseSee(), RCParser::parseSenseBody(), and RCParser::parseServerParam().

void RCWorld::setBrain ( RCBrain Brain ) [inline]
 

Sets the strategy component of the player.

Parameters:
Brain   ref. to a RCBrain component

Definition at line 165 of file RCWorld.java.

Referenced by RCPlayer::RCPlayer().

void RCWorld::setDisplay ( RCDisplay Display ) [inline]
 

set the visualisation component of the player.

Parameters:
Display   ref. to the vis. component

Definition at line 175 of file RCWorld.java.

Referenced by RCPlayer::RCPlayer().


Member Data Documentation

double RCWorld::AngleToBall
 

Definition at line 100 of file RCWorld.java.

int RCWorld::AngleToBallTimeStamp
 

Definition at line 101 of file RCWorld.java.

RCObject RCWorld::Ball
 

Attributes.

Definition at line 86 of file RCWorld.java.

RCBrain RCWorld::Brain [private]
 

Definition at line 130 of file RCWorld.java.

int RCWorld::CurrentTimeStamp
 

Definition at line 120 of file RCWorld.java.

RCDisplay RCWorld::Display [private]
 

Associations.

Definition at line 129 of file RCWorld.java.

RCObject[] RCWorld::Enemies
 

Definition at line 87 of file RCWorld.java.

RCEvent RCWorld::Event
 

Definition at line 89 of file RCWorld.java.

RCObject[] RCWorld::Friends
 

Definition at line 88 of file RCWorld.java.

int RCWorld::GameMode
 

Definition at line 106 of file RCWorld.java.

RCLog RCWorld::Log
 

Definition at line 131 of file RCWorld.java.

final String RCWorld::MsgStart = "RCTEAM:"
 

Definition at line 104 of file RCWorld.java.

RCSeeEvent RCWorld::NearestFlag = null
 

Definition at line 116 of file RCWorld.java.

RCSeeEvent RCWorld::NearestLine = null
 

Definition at line 117 of file RCWorld.java.

boolean RCWorld::NewData
 

Definition at line 102 of file RCWorld.java.

boolean RCWorld::NewEvent
 

Definition at line 90 of file RCWorld.java.

Point2D Double RCWorld::OldPosition [private]
 

Definition at line 126 of file RCWorld.java.

boolean RCWorld::OutOfField [private]
 

Definition at line 123 of file RCWorld.java.

int RCWorld::OutOfFieldCounter [private]
 

Definition at line 124 of file RCWorld.java.

int RCWorld::PlayerNumber
 

Definition at line 91 of file RCWorld.java.

RCPlayerParamEvent RCWorld::PlayerParam
 

Definition at line 111 of file RCWorld.java.

RCPlayerTypeEvent RCWorld::PlayerType
 

Definition at line 112 of file RCWorld.java.

RCSenceEvent RCWorld::SenceBody
 

Definition at line 113 of file RCWorld.java.

RCServerParamEvent RCWorld::ServerParam
 

Definition at line 110 of file RCWorld.java.

int RCWorld::Side
 

Definition at line 108 of file RCWorld.java.

boolean RCWorld::ValidPosition = false
 

Definition at line 118 of file RCWorld.java.

double RCWorld::X1
 

Definition at line 94 of file RCWorld.java.

double RCWorld::X2
 

Definition at line 96 of file RCWorld.java.

double RCWorld::Y1
 

Definition at line 95 of file RCWorld.java.

double RCWorld::Y2
 

Definition at line 97 of file RCWorld.java.

double RCWorld::angle
 

Definition at line 99 of file RCWorld.java.

boolean RCWorld::enableOutOfField [private]
 

Definition at line 125 of file RCWorld.java.


The documentation for this class was generated from the following file:
(c) Copyright by Gruppe 1 :