Skip to content
Snippets Groups Projects
Select Git revision
  • ea9818a7e69a4f81a734121cf6d1df62bbc6f69a
  • main default protected
2 results

chess

  • Clone with SSH
  • Clone with HTTPS
  • Bolla Péter's avatar
    Bolla Péter authored
    MOVEMENT:
    * New enum: Movement -- gives the purpose of a move if it you can make it {Mov, Cap, No}
    * old void Move(int, int) function -> Movement CanMove(int, int) -- if the move is possible gives the purpose of the move
    * void Move(int, int) -- if Movement CanMove(int, int) returns Mov -> Move is possible, this function executes the move
    * bool Opponents(int, int) -- if i1, i2 is occupied and i1, i2 is from different teams returns true; else returns false;
    * bool CanCapture(int, int) -- if Opponents(int, int) returns true and i2 isn't King returns true else returns false
    GETTER:
    * bool Occupied(int) -- returns if the square is occupied
    * Piece GetPiece(int) -- returns the piece on the given square
    * Color GetColor(int) -- returns the color of the given square
    * bool IsMate() -- returns bool mate 
    CHECK:
    * bool TestIfCheck(Team) -- checks if the given team attacks and puts in check the other team
    * bool CanStopCheck(Team) -- checks if the given team can defend check ((only started in chess.cpp))
    * void Mate() --didnt start to write the code in chess.cpp
    
    protected::
    bool check, mate 
    ea9818a7
    History
    Name Last commit Last update