FileDocCategorySizeDatePackage
MoveTuple.javaAPI DocExample2105Sat Sep 12 03:01:00 BST 1998borland.samples.apps.chess.client.board

MoveTuple

public class MoveTuple extends Object

Fields Summary
public int
newpieceValue
public int
pieceValue
public int
pieceColor
public int
fromRank
public int
fromFile
public int
toRank
public int
toFile
Constructors Summary
public MoveTuple()

    newpieceValue = 0;
    pieceValue    = 0;
    pieceColor    = 0;
    fromRank      = 0;
    fromFile      = 0;
    toRank        = 0;
    toFile        = 0;
  
public MoveTuple(String x)

    try {
      newpieceValue = Integer.parseInt(x.substring(6));
      pieceValue    = Integer.parseInt(x.substring(0,1));
      pieceColor    = Integer.parseInt(x.substring(1,2));
      fromRank      = Integer.parseInt(x.substring(2,3));
      fromFile      = Integer.parseInt(x.substring(3,4));
      toRank        = Integer.parseInt(x.substring(4,5));
      toFile        = Integer.parseInt(x.substring(5,6));
    }
    catch (Exception e) {
      System.out.println("Failed to parse tokenmsg " + e);
    }
  
Methods Summary
public java.lang.StringtoString()

    //override this java.lang.Object method
    return String.valueOf(pieceValue) + pieceColor + fromRank + fromFile + toRank + toFile + newpieceValue;