bool Pawn :: Move(int X, int Y, bool Attack) { bool test=false; Math math; if(!Attack && X==this->getX_position()) { if(!this->getYaMove() && (math.abs(Y-this->getY_position()) ==2)) { test=true; } else if(((Y-this->getY_position() )== 1) && (this->getColor())) { test=true; } else if(((Y-this->getY_position() )== -1) && (!this->getColor())) { test=true; } } else if (Attack) { if( X == (this->getX_position()-1) || X == (this->getX_position()+1)) { if( Y == (this->getY_position()+1) ) { test=true; } } } return test; }