chessai

college code for ai playing chess in java

git clone https://9o.is/git/chessai.git

commit a56ed8044b9e4b7116373c5685125471e6610165
parent af4bc1aa096f86cb61415435d0a5997fbb60f30a
Author: Jul <jul@9o.is>
Date:   Sat,  1 Dec 2012 17:19:00 -0500

Implemented equals method in ChessCoordinate.

Diffstat:
Msrc/chess/ChessCoordinate.java | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/chess/ChessCoordinate.java b/src/chess/ChessCoordinate.java @@ -54,4 +54,10 @@ public class ChessCoordinate { public String toString() { return ""+file+rank; } + + public boolean equals(Object o) { + ChessCoordinate coor = (ChessCoordinate) o; + return coor.getRank() == this.getRank() && + coor.getFile() == this.getFile(); + } }