net.jetrix
Class Field

java.lang.Object
  extended by net.jetrix.Field

public class Field
extends Object

A game field.

Version:
$Revision: 577 $, $Date: 2005-01-11 01:57:14 +0100 (mar., 11 janv. 2005) $
Author:
Emmanuel Bourg

Field Summary
static byte BLOCK_BLUE
           
static byte BLOCK_GREEN
           
static byte BLOCK_PURPLE
           
static byte BLOCK_RANDOM
           
static byte BLOCK_RED
           
static byte BLOCK_VOID
           
static byte BLOCK_YELLOW
           
static int HEIGHT
           
static byte SPECIAL_ADDLINE
           
static byte SPECIAL_BLOCKBOMB
           
static byte SPECIAL_CLEARLINE
           
static byte SPECIAL_CLEARSPECIAL
           
static byte SPECIAL_GRAVITY
           
static byte SPECIAL_NUKEFIELD
           
static byte SPECIAL_QUAKEFIELD
           
static byte SPECIAL_RANDOMCLEAR
           
static byte SPECIAL_SWITCHFIELD
           
static int WIDTH
           
 
Constructor Summary
Field()
           
Field(byte[][] field)
           
 
Method Summary
 void clear()
          Clear the field.
 byte getBlock(int x, int y)
          Return the block at the specified location.
 String getFieldString()
          Return the string representing this field as used in the FieldMessage messages.
 boolean isEmpty()
          Check if the field is empty.
 void update(FieldMessage message)
          Update the field with the specified FieldMessage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WIDTH

public static final int WIDTH
See Also:
Constant Field Values

HEIGHT

public static final int HEIGHT
See Also:
Constant Field Values

BLOCK_VOID

public static final byte BLOCK_VOID
See Also:
Constant Field Values

BLOCK_BLUE

public static final byte BLOCK_BLUE
See Also:
Constant Field Values

BLOCK_YELLOW

public static final byte BLOCK_YELLOW
See Also:
Constant Field Values

BLOCK_GREEN

public static final byte BLOCK_GREEN
See Also:
Constant Field Values

BLOCK_PURPLE

public static final byte BLOCK_PURPLE
See Also:
Constant Field Values

BLOCK_RED

public static final byte BLOCK_RED
See Also:
Constant Field Values

BLOCK_RANDOM

public static final byte BLOCK_RANDOM
See Also:
Constant Field Values

SPECIAL_ADDLINE

public static final byte SPECIAL_ADDLINE
See Also:
Constant Field Values

SPECIAL_CLEARLINE

public static final byte SPECIAL_CLEARLINE
See Also:
Constant Field Values

SPECIAL_NUKEFIELD

public static final byte SPECIAL_NUKEFIELD
See Also:
Constant Field Values

SPECIAL_RANDOMCLEAR

public static final byte SPECIAL_RANDOMCLEAR
See Also:
Constant Field Values

SPECIAL_SWITCHFIELD

public static final byte SPECIAL_SWITCHFIELD
See Also:
Constant Field Values

SPECIAL_CLEARSPECIAL

public static final byte SPECIAL_CLEARSPECIAL
See Also:
Constant Field Values

SPECIAL_GRAVITY

public static final byte SPECIAL_GRAVITY
See Also:
Constant Field Values

SPECIAL_QUAKEFIELD

public static final byte SPECIAL_QUAKEFIELD
See Also:
Constant Field Values

SPECIAL_BLOCKBOMB

public static final byte SPECIAL_BLOCKBOMB
See Also:
Constant Field Values
Constructor Detail

Field

public Field()

Field

public Field(byte[][] field)
Method Detail

isEmpty

public boolean isEmpty()
Check if the field is empty.


update

public void update(FieldMessage message)
Update the field with the specified FieldMessage.


getFieldString

public String getFieldString()
Return the string representing this field as used in the FieldMessage messages.


getBlock

public byte getBlock(int x,
                     int y)
Return the block at the specified location.

Parameters:
x -
y -

clear

public void clear()
Clear the field.



Copyright © 2001-2008 Emmanuel Bourg. All Rights Reserved.