de.farafin.snEADy.player
Class OwnSnakeInfo

java.lang.Object
  extended by de.farafin.snEADy.player.SnakeInfo
      extended by de.farafin.snEADy.player.OwnSnakeInfo
All Implemented Interfaces:
PubConstants, java.io.Serializable

public class OwnSnakeInfo
extends SnakeInfo
implements java.io.Serializable

This is just a class for storing informations. It doesnt contain methods because it doesnt need to calculate anything. Its just a set of informations for the player. Additional to all snakes, the player have more informations about his own snake. Diese Klasse ist zum Speichern von Informationen gedacht. Sie enthällt keine Methoden weil sie nichts berechnen muss. Es ist nur eine Menge von Informationen für den Spieler. Zusätzlich zu den anderen Schlangen hat spieler mehr Informationen über die eigene Schlange.

Author:
roland, lars
See Also:
Serialized Form

Field Summary
 int headDirection
          This is the directon in which the head of the snake points.
 long lastCalculatedMemUsage
          lastCalculatedMemUsage is how the name sais, the memory usage of the player at it was calculated last time.
 long nextMoveTime
          nextMoveTime is the gameTime cycle the snake will move next time.
 
Fields inherited from class de.farafin.snEADy.player.SnakeInfo
headPosLine, headPosRow, playerName, points, snakeChar, snakeLength, snakeStatus, waitCycles
 
Fields inherited from interface de.farafin.snEADy.player.PubConstants
EAST, EXIT, FREE, IN_ACTION, IN_EXIT, IN_HEAVEN, LENGTH, MOVE_EAST, MOVE_NORTH, MOVE_SOUTH, MOVE_WEST, NORTH, PLAYER_0, PLAYER_1, PLAYER_2, PLAYER_3, PLAYER_4, PLAYER_5, PLAYER_6, PLAYER_7, PLAYER_8, PLAYER_9, POINTS, SHORTER, SLOWDOWN, SOUTH, SPEED, TURN_LEFT, TURN_NONE, TURN_RIGHT, WALL, WEST
 
Constructor Summary
OwnSnakeInfo()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nextMoveTime

public long nextMoveTime
nextMoveTime is the gameTime cycle the snake will move next time. It moves directly after the player finished his thinking method and before the next player starts his calculation.

nextMoveTime ist der gameTime Zyklus wenn die Schlange das nächste mal ziehen wird. Sie zieht direkt nach dem der spieler seine calculate-methode beendet hat, noch bevor der nächste spieler seine überlegung startet.

See Also:
GameInfo.gameTime

lastCalculatedMemUsage

public long lastCalculatedMemUsage
lastCalculatedMemUsage is how the name sais, the memory usage of the player at it was calculated last time. The calculation of this is very time consumting, thats why it is not done every gameCycle. lastCalculatedMemUsage ist wie der Name sagt, der Speicherplatz, den der Spieler belegt hat, als das letzte mal kontrolliert wurde. Die Berechnung ist sehr Zeitaufwendig und erfolgt deswegen nicht in jedem game Zyklus.


headDirection

public int headDirection
This is the directon in which the head of the snake points. This is important because the player decided if the head should turn left, right or doesn't turn at all. So the move direction depends on the turn of the player and the direction the snakes head pointed before. Dies ist die Richtung in die der Kopf der Schlange schaut. Das ist wichtig, weil der Spieler entscheiden muss ob sich der Kopf nach links, rechts oder gar nicht drehen soll. Also hängt die Richtung in die die Schlange sich als nächstes bewegt von der aktuellen richtung des Kopfes und der richtung ab in die der spieler lenkt.

See Also:
PubConstants.NORTH, PubConstants.EAST, PubConstants.SOUTH, PubConstants.WEST
Constructor Detail

OwnSnakeInfo

public OwnSnakeInfo()