|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdk.itu.smds.torusman.Board
public class Board
Data structure for holding board data.
Field Summary | |
---|---|
byte[][] |
grid
Board contents. |
int |
height
Number of board rows; must be less than 256. |
int |
width
Number of board columns; must be less than 256. |
Constructor Summary | |
---|---|
Board()
Nullary constructor, only used for deserialization. |
|
Board(int width,
int height,
byte[][] grid)
Board constructor. |
Method Summary | |
---|---|
void |
deserialize(java.io.DataInputStream in)
Deserialize this object from a stream. |
void |
serialize(java.io.DataOutputStream out)
Serialize this object to a stream. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int width
public int height
public byte[][] grid
Constructor Detail |
---|
public Board(int width, int height, byte[][] grid)
width
- must be less than 256.height
- must be less than 256.grid
- the gridpublic Board()
Method Detail |
---|
public void serialize(java.io.DataOutputStream out) throws java.io.IOException
out
- the out
java.io.IOException
- Signals that an I/O exception has occurred.public void deserialize(java.io.DataInputStream in) throws java.io.IOException
in
- the in
java.io.IOException
- Signals that an I/O exception has occurred.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |