#include "StrategyParams2002.h"
#include "assert.h"

//==================================================================
//==================================================================
//constructor, calls loadValues 
StrategyParams2002::StrategyParams2002()
{
  loadValues();
}
//==================================================================
//==================================================================
//opens param files for various omni types and fills structs with loaded values
void StrategyParams2002::loadValues()
{
  //-----------------------------------------
  ifstream mainFile;
  mainFile.open("Params/StrategyParams2002.txt", ios::nocreate);
  ASSERT(mainFile.fail() == 0, "CAN'T OPEN StrategyParams2002.txt!");
  //-------------------
  READ_FLOAT(GOALIE_OCCLUSION_THRESH);
  READ_FLOAT(GOALIE_FRONT_RADIUS);
  READ_FLOAT(BALL_VEL_THRESH_FOR_GOALIE);
  READ_FLOAT(BALL_VEL_THRESH_FOR_INTERCEPT);
  READ_FLOAT(GOALIE_ROAM_RADIUS);
  READ_FLOAT(GOALIE_OPTIMAL_PASS_DISTANCE);
  READ_FLOAT(GOALIE_MAX_HOLD_TIME);
  READ_FLOAT(GOALIE_TO_OPPONENT_DIST_THRESH);
  READ_FLOAT(GOALIE_MIN_LANE_WIDTH);
  READ_FLOAT(GOALIE_PASS_TIME_LIMIT);
  READ_FLOAT(OUR_PENALTY_ANGLE);
  READ_FLOAT(MIDFIELD_AREA_RADIUS);
  READ_FLOAT(MIDFIELD_SHIELD_BALL_DISTANCE);
  READ_FLOAT(MIDFIELD_MAX_STRIP_DISTANCE);
  READ_FLOAT(SPIN_TOL);
  READ_FLOAT(KICK_TOL);
  READ_FLOAT(PASS_TOL);
  READ_FLOAT(KICK_VELOCITY);
  READ_FLOAT(MAX_ACCEL);
  READ_FLOAT(PENALTY_SHOT_ANGLE);
  READ_FLOAT(SHOOT_THRESH_LINE);
  READ_FLOAT(CLEAR_UPFIELD_THRESH_LINE);
  READ_FLOAT(CLEAR_UPFIELD_TARGET_LINE);
  READ_FLOAT(RUN_PAST_BALL_DISTANCE);
  READ_FLOAT(SLOW_STRIP_VELOCITY);
  READ_FLOAT(CLEAR_UPFIELD_LINE);
  READ_FLOAT(FAR_FORWARD_LINE);
  READ_FLOAT(SIDELINE_DIVIDER);
  READ_FLOAT(SIDELINE_Y_RECEIVE_PASS);
  READ_FLOAT(DIST_TO_PASS_DEST);
  READ_FLOAT(PASS_LANE_THRESH);
  READ_FLOAT(PASS_LANE_ANGLE_THRESH);
  READ_FLOAT(SHOOT_LANE_THRESH);
  READ_FLOAT(MIN_GOALIE_DIST);
  READ_FLOAT(PASS_LENGTHS_RATIO);
  READ_FLOAT(PASS_COMBO_MAX_LENGTH);
  READ_FLOAT(PASS_COMBO_MIN_LENGTH);
  READ_FLOAT(PASS_COMBO_MAX_ANGLE);
  READ_FLOAT(PASS_COMBO_CLEARANCE_THRESH);
  READ_FLOAT(PASS_SHOT_MAX_LENGTH);
  READ_FLOAT(PASS_SHOT_MIN_LENGTH);
  READ_FLOAT(PASS_SHOT_MAX_ANGLE);
  READ_FLOAT(PASS_SHOT_CLEARANCE_THRESH);
  READ_FLOAT(INTERCEPTION_SLOW_BALL_SPEED);
  READ_FLOAT(INTERCEPTION_DELAY_PARAM);
  READ_FLOAT(INTERCEPTION_DELAY_OFFSET);
  READ_FLOAT(CORNER_KICK_TIME_LIMIT);
  READ_FLOAT(CORNER_DIST);
  READ_FLOAT(LEFT_CORNER_POINT_1X);
  READ_FLOAT(LEFT_CORNER_POINT_1Y);
  READ_FLOAT(LEFT_CORNER_POINT_2X);
  READ_FLOAT(LEFT_CORNER_POINT_2Y);
  READ_FLOAT(LEFT_CORNER_POINT_3X);
  READ_FLOAT(LEFT_CORNER_POINT_3Y);
  READ_FLOAT(LEFT_CORNER_POINT_4X);
  READ_FLOAT(LEFT_CORNER_POINT_4Y);
  READ_FLOAT(LEFT_CORNER_POINT_5X);
  READ_FLOAT(LEFT_CORNER_POINT_5Y);
  READ_FLOAT(LEFT_CORNER_POINT_6X);
  READ_FLOAT(LEFT_CORNER_POINT_6Y);
  READ_FLOAT(LEFT_CORNER_POINT_7X);
  READ_FLOAT(LEFT_CORNER_POINT_7Y);
  READ_FLOAT(RIGHT_CORNER_POINT_1X);
  READ_FLOAT(RIGHT_CORNER_POINT_1Y);
  READ_FLOAT(RIGHT_CORNER_POINT_2X);
  READ_FLOAT(RIGHT_CORNER_POINT_2Y);
  READ_FLOAT(RIGHT_CORNER_POINT_3X);
  READ_FLOAT(RIGHT_CORNER_POINT_3Y);
  READ_FLOAT(RIGHT_CORNER_POINT_4X);
  READ_FLOAT(RIGHT_CORNER_POINT_4Y);
  READ_FLOAT(RIGHT_CORNER_POINT_5X);
  READ_FLOAT(RIGHT_CORNER_POINT_5Y);
  READ_FLOAT(RIGHT_CORNER_POINT_6X);
  READ_FLOAT(RIGHT_CORNER_POINT_6Y);
  READ_FLOAT(RIGHT_CORNER_POINT_7X);
  READ_FLOAT(RIGHT_CORNER_POINT_7Y);
  READ_FLOAT(STEP1COUNTER);
  READ_FLOAT(STEP2COUNTER);
  READ_FLOAT(STEP3COUNTER);
  READ_FLOAT(STEP4COUNTER);
  READ_FLOAT(STEP5COUNTER);
  READ_FLOAT(STEP6COUNTER);
  READ_FLOAT(STEP7COUNTER);
  READ_INT(TEST_METHOD);
  READ_FLOAT(TEST_SPEED);
  READ_FLOAT(TEST_ROTATION);
  READ_FLOAT(TEST_ROT_VEL);
  READ_FLOAT(ENABLE_SIMPLE_OFFENSE);
  READ_FLOAT(USE_CLEAR_UPFIELD);
  READ_FLOAT(USE_CORNER_KICK);
  READ_FLOAT(USE_DIRECT_KICK);
  READ_FLOAT(USE_UPFIELD_PASSING);
  READ_FLOAT(MIN_PASS_DEST);
  READ_FLOAT(PASS_TO_SHOT_DISTANCE);
  //-------------------
  READ_INT(ENABLE_BACK_PASS);
  READ_INT(ENABLE_CREATOR_ASSIST);
  READ_INT(ENABLE_OPPOSITE_COVER_SKILL);
  READ_INT(ENABLE_FOLLOW_DEFNDER_SKILL);
  READ_INT(ENABLE_SMART_ROTATE_AROUND_BALL);
  READ_INT(ENABLE_AGGRESSIVE_PULL_OFF_WALL);
  READ_INT(ENABLE_AGGRESSIVE_PULL_OFF_CORNER);
  READ_INT(JAM_AND_SHOOT_MODE);
  READ_INT(ENABLE_CAREFUL_STRIP_BALL); 
  //-------------------
  mainFile.close(); 
  //-----------------------------------------
}
//==================================================================
//==================================================================
