org.game.JVirus
Class Avatar

java.lang.Object
  |
  +--org.game.JVirus.Avatar
All Implemented Interfaces:
IFields

public class Avatar
extends java.lang.Object
implements IFields

Avatar class. Many variables are public for faster access.


Field Summary
 boolean eat_sequence
          mouth of avatar open or not
 int gameLifes
          whole game lifes
 int gameLifesCurrentLevel
          game lifes of current level
 int gameScore
          whole game score
 int gameScoreCurrentLevel
          game score of current level
protected  Matrix level
          reference to the level.
static int LEVEL_CAN_NOT_SOLVE
          must win first other level
static int LEVEL_CAN_SOLVE
          constant for can solve level
static int LEVEL_SOLVED
          constant for solved levels
 int lx
          last position x of the avatar in the current level
 int ly
          last position y of the avatar in the current level
 boolean move_direction
          running in the left or right direction
 int[] solvedLevels
          array of solved levels
 int x
          position x of the avatar in the current level
 int y
          position y of the avatar in the current level
 
Fields inherited from interface org.game.JVirus.IFields
AMD, AT_ACTION, AT_ANIM, AT_BEAM, AT_EAT, AT_EAT_SOUND1, AT_EAT_SOUND2, AT_END, AT_FAll, AT_HOLD, AT_MOVE, AT_PUSH, AT_WALL, BEAM0, BEAM1, BEAM2, BEAM3, BEAM4, BEAM5, BEAM6, BEAM7, BEAM8, BEAM9, BEOS, BLUEGATE, BLUEKEY, DATA1, DATA2, DATA3, DYNS1, DYNS2, DYNS3, DYNS4, DYNT1, DYNT2, DYNT3, DYNT4, EMPTY, END, GREENGATE, GREENKEY, INTEL, LIFE, LINUX, MAC, NOTHING, REDGATE, REDKEY, START, STONE, TREASURE, UNIX, WALL1, WALL2, WALL3, WALL4, WALL5, WINDOWS
 
Constructor Summary
Avatar()
          construct the Avatar.
 
Method Summary
 void setLevel(Matrix level, int x, int y)
          set the current playing level
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

level

protected Matrix level
reference to the level.

eat_sequence

public boolean eat_sequence
mouth of avatar open or not

move_direction

public boolean move_direction
running in the left or right direction

gameScore

public int gameScore
whole game score

gameScoreCurrentLevel

public int gameScoreCurrentLevel
game score of current level

gameLifes

public int gameLifes
whole game lifes

gameLifesCurrentLevel

public int gameLifesCurrentLevel
game lifes of current level

x

public int x
position x of the avatar in the current level

y

public int y
position y of the avatar in the current level

lx

public int lx
last position x of the avatar in the current level

ly

public int ly
last position y of the avatar in the current level

LEVEL_SOLVED

public static final int LEVEL_SOLVED
constant for solved levels

LEVEL_CAN_SOLVE

public static final int LEVEL_CAN_SOLVE
constant for can solve level

LEVEL_CAN_NOT_SOLVE

public static final int LEVEL_CAN_NOT_SOLVE
must win first other level

solvedLevels

public int[] solvedLevels
array of solved levels
Constructor Detail

Avatar

public Avatar()
construct the Avatar. Bevor using it call setLevel(Matrix level, int x, int y).
Method Detail

setLevel

public void setLevel(Matrix level,
                     int x,
                     int y)
set the current playing level