de.farafin.snEADy.player
Class SnakeInfo

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

public class SnakeInfo
extends java.lang.Object
implements PubConstants, 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.

This class contains general data about the Snakes which are in the arena.

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.

Diese Klasse enthällt allgemeine Daten über die Schlangen in der Arena.

Author:
roland, lars
See Also:
Serialized Form

Field Summary
 int headPosLine
          The line of the snakes heads position at the play field: playField[headPosLine][headPosRow].
 int headPosRow
          The row of the snakes heads position at the play field: playField[headPosLine][headPosRow].
 java.lang.String playerName
          The name of the player who controls the snake.
 int points
          The points the player, which controls the snake.
 char snakeChar
          The char value of the snake in the playField.
 int snakeLength
          The number of visable segments of the snake which is equal to the current length of the snake.
 int snakeStatus
          The status of the snake.
 long waitCycles
          Like it is described at GameInfo.gameTime, consists the game as a sequence of game cycles.
 
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
SnakeInfo()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

playerName

public java.lang.String playerName
The name of the player who controls the snake.

Der Name des Spielers der die Schlange steuert.


snakeChar

public char snakeChar
The char value of the snake in the playField.

Der char-Wert des Spielers auf dem Spielfeld.

See Also:
PubConstants.PLAYER_0

headPosLine

public int headPosLine
The line of the snakes heads position at the play field: playField[headPosLine][headPosRow].

Die Zeile der Kopfposition der Schlange auf dem Spielfeld: playField[headPosLine][headPosRow].

See Also:
LevelInfo.playField

headPosRow

public int headPosRow
The row of the snakes heads position at the play field: playField[headPosLine][headPosRow].

Die Spalte der Kopfposition der Schlange auf dem Spielfeld: playField[headPosLine][headPosRow].

See Also:
LevelInfo.playField

points

public int points
The points the player, which controls the snake.

Die Punkte des Spielers, der die Schlange steuert.


snakeLength

public int snakeLength
The number of visable segments of the snake which is equal to the current length of the snake.

Die Anzahl der sichtbaren Schlangensegmente was gleichbedeutend mit der Länge der Schlange ist.


waitCycles

public long waitCycles
Like it is described at GameInfo.gameTime, consists the game as a sequence of game cycles. To realize different velocities for the snakes, are the snakes not moving each game cycle. So the player thinks waitCycles times and than the snake moves one time. The fastest imaginable speed is that the snake moves (one field) each game cycle. For the tournament might be the value higher. visit www.snEADy.de for more informations about this.
So you can imagine waitCycles as a strange kind of speed. The less waitCycles is, the more often the snake will move, but the less often the player will have time to think what he is doing next. waitCycles is the number of cycles, the snake waits between two moves.

Wie bereits in GameInfo.gameTime beschrieben, besteht das Spiel aus einer Folge von spiel zyklen. Um verschiedene Geschwindigkeiten der Schlangen zu realisieren, ziehen sie nicht jeden Zyklus. Das bedeutet, ein Spieler denkt erst waitCycles mal nach bevor die Schlange ein mal zieht. Die höchste denkbare Geschwindigkeit ist, dass die Schlange jede Runde (ein Feld) zieht. Für das Turnier werden wir den Wert veilleicht erhöhen, schaut einfach auf www.snEADy.de vorbei um euch da genauer zu informieren.
Man kann sich waitCycles also auch als eine art Geschwindigkeit vorstellen. Je kleiner waitCycles ist, desto öfter bewegt sich die Schlange, aber desto weniger kann ein spieler über den nächsten Zug nachdenken. waitCycles ist die Anzahl der zyklen die die Schlange zwischen zwei mal bewegen warten muss.

See Also:
GameInfo.gameTime

snakeStatus

public int snakeStatus
The status of the snake. Possible is: IN_ACTION, IN_HEAVAN and IN_EXIT. The status gives informations if the snake is still running around (IN_ACTION), died (IN_HEAVEN) or went out of the arena through the exit (IN_EXIT).
For more details see PubConstants.

Der Status der Schlange. Möglich ist: IN_ACTION, IN_HEAVAN und IN_EXIT. Der Status gibt an, ob die Schlange noch auf dem Spielfeld aktiv ist (IN_ACTION), gestorben ist (IN_HEAVEN) oder durch den exit das Spielfeld verlassen hat (IN_EXIT).
Siehe PubConstants für mehr Details.

See Also:
PubConstants.IN_ACTION, PubConstants.IN_HEAVEN, PubConstants.IN_EXIT
Constructor Detail

SnakeInfo

public SnakeInfo()