|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PubConstants
This Interface contains some constants which you need
to interpete the playfield or specify directions. Just implement it in your class you want to
use it in. Than you are able to use the constants as if they were local variables.
See Luke Wallwalker as excample.
Dieses Interface enthällt einige Konstanten mit denen ihr das Spielfeld interpretieren, und
Richtungen spezifizieren könnt. Es reicht aus das Interface in der klasse in der ihr es nutzen
wollt zu implementieren, dann könnt ihr die Konstanten wie lokale Variablen benutzen.
Schaut euch eifnach LukeWallwalker an für ein Beispiel.
Field Summary | |
---|---|
static int |
EAST
head direction of the snake |
static char |
EXIT
exit fields: This are the exit fields. |
static char |
FREE
free field |
static int |
IN_ACTION
if a snake is on the field and running |
static int |
IN_EXIT
if the snake has left the arena throu the exit |
static int |
IN_HEAVEN
if the snake died in battle, rest in peace |
static char |
LENGTH
length goody: makes the snake longer The snake grows slowly each time it moves. |
static int |
MOVE_EAST
move to this direction |
static int |
MOVE_NORTH
move to this direction |
static int |
MOVE_SOUTH
move to this direction |
static int |
MOVE_WEST
move to this direction |
static int |
NORTH
head direction of the snake |
static char |
PLAYER_0
player 0 |
static char |
PLAYER_1
player 1 |
static char |
PLAYER_2
player 2 |
static char |
PLAYER_3
player 3 |
static char |
PLAYER_4
player 4 |
static char |
PLAYER_5
player 5 |
static char |
PLAYER_6
player 6 |
static char |
PLAYER_7
player 7 |
static char |
PLAYER_8
player 8 |
static char |
PLAYER_9
player 9 |
static char |
POINTS
points goody: gives the player points points goody: gibt dem Spieler Punkte |
static char |
SHORTER
shorter goody: makes the snake shorter The snakes head moves ahead as normal, but the tail looses each time the snake moves one segment until its new length is reached. |
static char |
SLOWDOWN
slowdown goody: increase waitCycle by one if the maximum wasn't reached. |
static int |
SOUTH
head direction of the snake |
static char |
SPEED
speed goody: decrease waitCycle by one if the minimum wasn't reached. |
static int |
TURN_LEFT
the snake turns left |
static int |
TURN_NONE
the snake moves stright ahead |
static int |
TURN_RIGHT
the snake turns right |
static char |
WALL
blocked field |
static int |
WEST
head direction of the snake |
Field Detail |
---|
static final char FREE
static final char WALL
static final char PLAYER_0
static final char PLAYER_1
static final char PLAYER_2
static final char PLAYER_3
static final char PLAYER_4
static final char PLAYER_5
static final char PLAYER_6
static final char PLAYER_7
static final char PLAYER_8
static final char PLAYER_9
static final char LENGTH
SnakeInfo.snakeLength
,
Constant Field Valuesstatic final char SPEED
SnakeInfo.waitCycles
,
Constant Field Valuesstatic final char POINTS
SnakeInfo.points
,
Constant Field Valuesstatic final char SLOWDOWN
SnakeInfo.waitCycles
,
Constant Field Valuesstatic final char SHORTER
SnakeInfo.snakeLength
,
Constant Field Valuesstatic final char EXIT
GameInfo.gameTime
,
GameInfo.exitTime
,
Constant Field Valuesstatic final int NORTH
static final int EAST
static final int SOUTH
static final int WEST
static final int MOVE_NORTH
static final int MOVE_EAST
static final int MOVE_SOUTH
static final int MOVE_WEST
static final int IN_ACTION
static final int IN_HEAVEN
static final int IN_EXIT
static final int TURN_NONE
static final int TURN_LEFT
static final int TURN_RIGHT
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |