Compare commits
No commits in common. "d883a7ace78388cb2fe069d15fcef67fc55c338b" and "a81ad7881f362607fca7235f24a8cd5e40cfe40a" have entirely different histories.
d883a7ace7
...
a81ad7881f
|
|
@ -106,22 +106,8 @@ public class Board {
|
|||
}
|
||||
|
||||
public String toString() {
|
||||
PresentState ps = new PresentState();
|
||||
for(int y=0;y<lNum;y++) {
|
||||
for (int x;x<cNum;x++) {
|
||||
Piece piece = getPieces(x,y);
|
||||
if(piece!=null) {
|
||||
ps.append(piece.isWhite()?"W":"B");
|
||||
ps.append(piece.getType().toString().charAt(0));
|
||||
}
|
||||
else {
|
||||
ps.append("--");
|
||||
}
|
||||
ps.append(" ");
|
||||
}
|
||||
ps.append("\n");
|
||||
}
|
||||
return ps.toString("board's present state");
|
||||
//TODO
|
||||
return "";
|
||||
}
|
||||
|
||||
public ArrayList<Piece> getPieces() {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ public class Move {
|
|||
private int toX, toY;
|
||||
private Piece capturedPiece;
|
||||
|
||||
public Move ( Piece piece, int fromX, int fromY, int toX, int toY, Piece capturedPiece){
|
||||
public Move ( Piece piece, int fromX, int fromY, int toX, int toY, Piece captured) {
|
||||
this.piece = piece;
|
||||
this.fromX = fromX;
|
||||
this.fromY = fromY;
|
||||
|
|
@ -36,8 +36,7 @@ public class Move {
|
|||
return capturedPiece != null;
|
||||
}
|
||||
public String toString() {
|
||||
return piece + ":("+ fromX + "," + fromY + ")-("+ toX + "," + toY + ")" +
|
||||
( capturedPiece != null? "capturing "+ capturedPiece: "");
|
||||
return piece + ":("+ fromX + "," + fromY + ")-("+ toX + "," + toY + ")" + ( capturedPiece != null? "capturing "+ capturedPiece: "");
|
||||
}
|
||||
// remove commit message
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue