package como.commlet.webcheckers;

import java.io.*;
import como.io.*;

public class Move implements Saveable {
  // solution rejete car ca marche pas bien
  // on passe des chaine de caractere a la place


  //MEMBRES

int SourceX, SourceY, DestX, DestY, Eating, Finished;

  //CONSTRUCTEUR

public Move(){
  //Obligatoire pour le load
}

public Move(int Sx,int Sy,int Dx,int Dy,int Eating,int Finished){
  this.SourceX = Sx;
  this.SourceY = Sy;
  this.DestX = Dx;
  this.DestY = Dy;
  this.Eating = Eating;
  this.Finished = Finished;
}

  //METHODES

public void load (ObjectInputStream o) throws IOException {
  SourceX = o.readInt();
  SourceY = o.readInt();
  DestX = o.readInt();
  DestY = o.readInt();
  Eating = o.readInt();
  Finished = o.readInt();
}

public void save (ObjectOutputStream o) throws IOException {
  o.writeInt(SourceX);
  o.writeInt(SourceY);
  o.writeInt(DestX);
  o.writeInt(DestY);
  o.writeInt(Eating);
  o.writeInt(Finished);
}

}
