From d1a82db0cffeb55553f1095cd68f79d973fd98d3 Mon Sep 17 00:00:00 2001 From: djib Date: Wed, 11 Jan 2006 22:24:16 +0000 Subject: [PATCH] The moves of the Queen are now checked. Adding checking of the moves for the pawn will allow to release version 0.2 !!! --- src/suicideChess/Rules.java | 2089 ++++++++++++++++++++++++++++++++++- 1 file changed, 2047 insertions(+), 42 deletions(-) diff --git a/src/suicideChess/Rules.java b/src/suicideChess/Rules.java index 7b7d672..b312426 100644 --- a/src/suicideChess/Rules.java +++ b/src/suicideChess/Rules.java @@ -31,41 +31,37 @@ public class Rules { public ArrayList legalMovesFromSquare(Square fromSquare, Board board) throws NotAValidSquare { Piece movingPiece = board.getPiece(fromSquare); switch (movingPiece.getPieceType()) { - case Piece.NONE: - break; - case Piece.WHITE_PAWN: - //@TODO - break; - case Piece.BLACK_PAWN: - //@TODO - break; - default: - - //look for all valid moves - for (int ray=0; - ray