chessai

college code for ai playing chess in java

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

ChessMove.java

(976B)


      1 package chess;
      2 
      3 import chess.utils.ChessDirection;
      4 
      5 import java.util.ArrayList;
      6 import java.util.List;
      7 
      8 /**
      9  *
     10  */
     11 public class ChessMove {
     12 
     13     private ChessCoordinate coordinate;
     14     private ChessDirection direction;
     15     private int evaluation;
     16     private int steps;
     17 
     18     public ChessMove(
     19             ChessCoordinate coordinate,
     20             ChessDirection direction,
     21             int steps) {
     22         this.coordinate = coordinate;
     23         this.direction = direction;
     24         this.steps = steps;
     25     }
     26 
     27     public int getSteps() {
     28         return steps;
     29     }
     30 
     31     public ChessDirection getDirection() {
     32         return direction;
     33     }
     34 
     35     public ChessCoordinate getCoordinate() {
     36         return coordinate;
     37     }
     38 
     39     public int getEvaluation() {
     40         return evaluation;
     41     }
     42 
     43     public void setEvaluation(int evaluation) {
     44         this.evaluation = evaluation;
     45     }
     46 
     47     public String toString() {
     48         return coordinate+" "+direction+" "+steps+" steps";
     49     }
     50 }