public bool canExecute(State state) { Point new_point = new Point() { x_coord = this._characterPosition.x_position, z_coord = this._characterPosition.z_position }; if (LearningCharacter.getObstacleType(new_point) == 3 && state.getEnergy() > 0) { return(true); } return(false); }
public bool canExecute(State state) { if (this._characterPosition.z_index != 9 && state.getEnergy() > 0 && state.getHp() > 0) { Point new_point = new Point() { x_coord = this._characterPosition.x_position, z_coord = this._characterPosition.z_position - 10 }; if (LearningCharacter.getObstacleType(new_point) != 1) { return(true); } } return(false);; }