home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-08-14 | 591 b | 36 lines |
- package como.commlet.nicnacnoe;
-
- import java.io.*;
- import como.io.*;
-
- public class Piece implements Saveable {
- int x,y,p,nextTurn;
-
- public Piece() {
- }
-
- public Piece(int x,int y,int p,int n) {
- this.x = x;
- this.y = y;
- this.p = p;
- }
- public Piece(int x,int y,int p) {
- this.x = x;
- this.y = y;
- this.p = p;
- }
- public void load(ObjectInputStream o) throws IOException {
- x = o.readInt();
- y = o.readInt();
- p = o.readInt();
- nextTurn = o.readInt();
- }
- public void save(ObjectOutputStream o) throws IOException {
- o.writeInt(x);
- o.writeInt(y);
- o.writeInt(p);
- o.writeInt(nextTurn);
- }
- }
-
-