text: //
  // Created by Andrey Sikorin
  //
  
  #ifndef CHSMV_SRC_VALIDATOR_H_
  #define CHSMV_SRC_VALIDATOR_H_
  
  #include <cmath>
  
  #include <string>
  
  #include "board.h"
  
  namespace chsmv {
  
  class Validator {
   public:
    Vector start_;
    Vector end_;
    Board board_;
  
    void ChangeTurn();
  
    bool IsValidStartColor() const;
  
    bool IsTheSameColor() const;
  
    bool IsCapture() const;
  
    bool CheckPawnMove() const;
  
    bool CheckPawnCapture() const;
  
    bool IsPawnPromotion() const;
  
    void MakePromotion(char piece);
  
    bool IsEnPassant() const;
  
    bool IsLongPawnMove() const;
  
    void ValidateEnPassant();
  
    void MakeEnPassant();
  
    bool CheckKnight() const;
  
    bool CheckRook() const;
  
    void ValidateRookFirstMove();
  
    void ValidateCornerCapture();
  
    bool CheckBishop() const;
  
    bool CheckQueen() const;
  
    bool CheckKing() const;
  
    void ValidateKingFirstMove();
  
    bool CheckCastling() const;
  
    void MakeCastling();
  
    void MakeMove();
  
    bool IsKingUnderCheck() const;
  
   private:
    bool CheckCastlingPath(const Vector& v_1, const Vector& v_2) const;
  };
  
  }
  
  #endif //CHSMV_SRC_VALIDATOR_H_
  