public enum Errors {

    /**
     * There is already a coach connected.
     */
    ALREADY_HAVE_OFFLINE_COACH,

    /**
     * Cannot reconnect while the PlayMode is PLAYON.
     */
    CANNOT_RECONNECT_WHILE_PLAYON,

    /**
     * Cannot say a freeform while the PlayMode is PLAYON.
     */
    CANNOT_SAY_FREEFORM_WHILE_PLAYON,

    /**
     * Tried to connect a coach when the server isn't in coach mode.
     */
    CONNECTED_OFFLINE_COACH_WITHOUT_COACH_MODE,

    /**
     * Connection has failed.
     */
    CONNECTION_FAILED,

    /**
     * The server could not parse the say message.
     */
    COULD_NOT_PARSE_SAY,

    /**
     * A goalie already exists.
     */
    GOALIE_ALREADY_EXISTS,

    /**
     * Illegal client version provided.
     */
    ILLEGAL_CLIENT_VERSION,

    /**
     * The command sent to the server is in an invalid form.
     */
    ILLEGAL_COMMAND_FORM,

    /**
     * Tried setting the game mode to an invalid mode.
     */
    ILLEGAL_MODE,

    /**
     * The object passed to the server is in an invalid form.
     */
    ILLEGAL_OBJECT_FORM,

    /**
     * Illegal teamname.
     */
    ILLEGAL_TEAMNAME,

    /**
     * Illegal or too long teamname.
     */
    ILLEGAL_TEAMNAME_OR_TOO_LONG_TEAMNAME,

    /**
     * The XPM image recieved by the server wasn't in a valid format.
     */
    INVALID_XPM_DATA,

    /**
     * The server cannot connect any more monitors.
     */
    NO_MORE_MONITOR,

    /**
     * The server cannot connect any more teams.
     */
    NO_MORE_TEAM,

    /**
     * The server cannot connect any more players or goalie's.
     * Or an illegal client version was sent to SServer.
     */
    NO_MORE_PLAYER_OR_GOALIE_OR_ILLEGAL_CLIENT_VERSION,

    /**
     * No such team or player.
     */
    NO_SUCH_TEAM_OR_PLAYER,

    /*
     * Player type is out of range.
     */
    OUT_OF_RANGE_PLAYER_TYPE,

    /**
     * A red carded player tried to reconnect.
     */
    RED_CARDED_PLAYER,

    /**
     * Too many advice messages have been sent.
     */
    SAID_TOO_MANY_ADVICE_MESSAGES,

    /**
     * Too many define messages have been sent.
     */
    SAID_TOO_MANY_DEFINE_MESSAGES,

    /**
     * Too many del messages have been sent.
     */
    SAID_TOO_MANY_DEL_MESSAGES,

    /**
     * Too many freeform messages have been sent.
     */
    SAID_TOO_MANY_FREEFORM_MESSAGES,

    /**
     * Too many info messages have been sent.
     */
    SAID_TOO_MANY_INFO_MESSAGES,

    /**
     * We have said too many things, wait to say again.
     */
    SAID_TOO_MANY_MESSAGES,

    /**
     * Too many meta messages have been sent.
     */
    SAID_TOO_MANY_META_MESSAGES,

    /**
     * Too many rule messages have been sent.
     */
    SAID_TOO_MANY_RULE_MESSAGES,

    /**
     * Failed to open the socket when connecting to the server.
     */
    SOCKET_OPEN_FAILED,

    /**
     * We tried to perform too many moves in one turn.
     */
    TOO_MANY_MOVES,

    /**
     * The command sent to the server is completely unknown.
     */
    UNKNOWN_COMMAND;
} public enum Flag {

    /**
     * A flag used to indicate the center of something. Could be of a goal,
     * penalty box etc.
     */
    CENTER,

    /**
     * A flag used to indicate the left of something. Could be of a goal,
     * left corner flag, penalty box etc.
     */
    LEFT,

    /**
     * The flag on the left hand side of the goal, 10 along from the center of the goal. (could be left or right goal)
     */
    LEFT_10,

    /**
     * The flag on the left hand side of the goal, 20 along from the center of the goal. (could be left or right goal)
     */
    LEFT_20,

    /**
     * The flag on the left hand side of the goal, 30 along from the center of the goal. (could be left or right goal)
     */
    LEFT_30,

    /**
     * The flag on the other side of the pitch, 10 along from the center line. (could be top or bottom)
     */
    OTHER_10,

    /**
     * The flag on the other side of the pitch, 20 along from the center line. (could be top or bottom)
     */
    OTHER_20,

    /**
     * The flag on the other side of the pitch, 30 along from the center line. (could be top or bottom)
     */
    OTHER_30,

    /**
     * The flag on the other side of the pitch, 40 along from the center line. (could be top or bottom)
     */
    OTHER_40,

    /**
     * The flag on the other side of the pitch, 50 along from the center line. (could be top or bottom)
     */
    OTHER_50,

    /**
     * The flag on our side of the pitch, 10 along from the center line. (could be top or bottom)
     */
    OWN_10,

    /**
     * The flag on our side of the pitch, 20 along from the center line. (could be top or bottom)
     */
    OWN_20,

    /**
     * The flag on our side of the pitch, 30 along from the center line. (could be top or bottom)
     */
    OWN_30,

    /**
     * The flag on our side of the pitch, 40 along from the center line. (could be top or bottom)
     */
    OWN_40,

    /**
     * The flag on our side of the pitch, 50 along from the center line. (could be top or bottom)
     */
    OWN_50,

    /**
     * A flag used to indicate the right of something. Could be of a goal,
     * left corner flag, penalty box etc.
     */
    RIGHT,

    /**
     * The flag on the right hand side of the goal, 10 along from the center of the goal. (could be left or right goal)
     */
    RIGHT_10,

    /**
     * The flag on the right hand side of the goal, 20 along from the center of the goal. (could be left or right goal)
     */
    RIGHT_20,

    /**
     * The flag on the right hand side of the goal, 30 along from the center of the goal. (could be left or right goal)
     */
    RIGHT_30;

    /**
     * Checks if the enum flag is LEFT RIGHT or CENTER.
     *
     * @param pointer The flag to check.
     * @return true or false
     */
    public static boolean isLeftRightCenter(Flag pointer) {
        if (pointer.name().equals("LEFT") || pointer.name().equals("CENTER") || pointer.name().equals("RIGHT")) {
            return true;
        } else {
            return false;
        }
    }

    /**
     * Checks if the enum flag is LEFT or RIGHT.
     *
     * @param pointer The flag to check.
     * @return true or false
     */
    public static boolean isLeftRight(Flag pointer) {
        if (pointer.name().equals("LEFT") || pointer.name().equals("RIGHT")) {
            return true;
        } else {
            return false;
        }
    }
} public enum Line {

    /**
     * The center line.
     */
    CENTER,

    /**
     * The line behind your goal.
     */
    OWN,

    /**
     * The line behind the other goal.
     */
    OTHER,

    /**
     * The line along the left hand edge (dependant on which direction your playing)
     */
    LEFT,

    /**
     * The line along the right hand edge (dependant on which direction your playing)
     */
    RIGHT
} public enum Ok {

    /**
     * The move command executed successfully.
     */
    MOVE,

    /**
     * The change_mode command executed successfully.
     */
    CHANGE_MODE,

    /**
     * The check_ball command executed successfully.
     */
    CHECK_BALL,

    /**
     * The start command executed successfully.
     */
    START,

    /**
     * The recover command executed successfully.
     */
    RECOVER,

    /**
     * The ear command executed successfully.
     * Ear was turned on.
     */
    EAR_ON,

    /**
     * The ear command executed successfully.
     * Ear was turned off.
     */
    EAR_OFF,

    /**
     * The say command executed successfully.
     */
    SAY,

    /**
     * The change_player_type command executed successfully.
     */
    CHANGE_PLAYER_TYPE,

    /**
     * The look command executed successfully.
     */
    LOOK,

    /**
     * The team_names command executed successfully.
     */
    TEAM_NAMES,

    /**
     * The team_graphic command executed successfully.
     */
    TEAM_GRAPHIC,

    /**
     * The eye command was executed successfully.
     * Eye was turned on.
     */
    EYE_ON,

    /**
     * The eye command was executed successfully.
     * Eye was turned off.
     */
    EYE_OFF;
} public enum PlayMode {

    /**
     * The mode of a game before it starts.
     */
    BEFORE_KICK_OFF,

    /**
     * The time has finished.
     */
    TIME_OVER,

    /**
     * The default play mode.
     */
    PLAY_ON,

    /**
     * We get kick off!
     */
    KICK_OFF_OWN,

    /**
     * They get kick off.
     */
    KICK_OFF_OTHER,

    /**
     * We get a kick in.
     */
    KICK_IN_OWN,

    /**
     * They get a kick in.
     */
    KICK_IN_OTHER,

    /**
     * We get a free kick.
     */
    FREE_KICK_OWN,

    /**
     * They get a free kick.
     */
    FREE_KICK_OTHER,

    /**
     * We commited a free kick fault.
     */
    FREE_KICK_FAULT_OWN,

    /**
     * They commited a free kick fault.
     */
    FREE_KICK_FAULT_OTHER,

    /**
     * We get a corner kick.
     */
    CORNER_KICK_OWN,

    /**
     * They get a corner kick.
     */
    CORNER_KICK_OTHER,

    /**
     * We get a goal kick.
     */
    GOAL_KICK_OWN,

    /**
     * They get a goal kick.
     */
    GOAL_KICK_OTHER,

    /**
     * We scored!
     */
    GOAL_OWN,

    /**
     * They scored = (
     */
    GOAL_OTHER,

    /**
     * Kick off for the left team.
     */
    KICK_OFF_L,

    /**
     * Kick off for the right team.
     */
    KICK_OFF_R,

    /**
     * Kick in for the left team.
     */
    KICK_IN_L,

    /**
     * Kick in for the right team.
     */
    KICK_IN_R,

    /**
     * Free kick for the right team.
     */
    FREE_KICK_R,

    /**
     * Free kick for the left team.
     */
    FREE_KICK_L,

    /**
     * Free kick fault for the left team.
     */
    FREE_KICK_FAULT_L,

    /**
     * Free kick fault for the left team.
     */
    FREE_KICK_FAULT_R,

    /**
     * Corner kick for the right team.
     */
    CORNER_KICK_R,

    /**
     * Corner kick for the left team.
     */
    CORNER_KICK_L,

    /**
     * Goal kick for the right team.
     */
    GOAL_KICK_R,

    /**
     * Goal kick for the left team.
     */
    GOAL_KICK_L,

    /**
     * Right team scored.
     */
    GOAL_R,

    /**
     * Left team scored.
     */
    GOAL_L;
} public enum RefereeMessage {

    /**
     * Half time.
     */
    HALF_TIME,

    /**
     * No more time remaining.
     */
    TIME_UP,

    /**
     * Second half elapsed with no opposition team present.
     */
    TIME_UP_WITHOUT_A_TEAM,

    /**
     * Extra time.
     */
    TIME_EXTENDED,

    /**
     * Ball was dropped somewhere.
     */
    DROP_BALL,

    /**
     * We were offside.
     */
    OFFSIDE_OWN,

    /**
     * They were offside.
     */
    OFFSIDE_OTHER,

    /**
     * We commited a foul.
     */
    FOUL_OWN,

    /**
     * They commited a foul.
     */
    FOUL_OTHER,

    /**
     * Right team went offside.
     */
    OFFSIDE_R,

    /**
     * Left team went offside.
     */
    OFFSIDE_L,

    /**
     * Right team commited a foul.
     */
    FOUL_R,

    /**
     * Left team commited a foul.
     */
    FOUL_L;
} public enum ServerParams {

    /**
     *
     */
    AUDIO_CUT_DIST,

    /**
     *
     */
    AUTO_MODE,

    /**
     *
     */
    BACK_DASH_RATE,

    /**
     *
     */
    BACK_PASSES,

    /**
     *
     */
    BALL_ACCEL_MAX,

    /**
     *
     */
    BALL_DECAY,

    /**
     *
     */
    BALL_RAND,

    /**
     *
     */
    BALL_SIZE,

    /**
     *
     */
    BALL_SPEED_MAX,

    /**
     *
     */
    BALL_STUCK_AREA,

    /**
     *
     */
    BALL_WEIGHT,

    /**
     *
     */
    CATCH_BAN_CYCLE,

    /**
     *
     */
    CATCH_PROBABILITY,

    /**
     *
     */
    CATCHABLE_AREA_L,

    /**
     *
     */
    CATCHABLE_AREA_W,

    /**
     *
     */
    CKICK_MARGIN,

    /**
     *
     */
    CLANG_ADVICE_WIN,

    /**
     *
     */
    CLANG_DEFINE_WIN,

    /**
     *
     */
    CLANG_DEL_WIN,

    /**
     *
     */
    CLANG_INFO_WIN,

    /**
     *
     */
    CLANG_MESS_DELAY,

    /**
     *
     */
    CLANG_MESS_PER_CYCLE,

    /**
     *
     */
    CLANG_META_WIN,

    /**
     *
     */
    CLANG_RULE_WIN,

    /**
     *
     */
    CLANG_WIN_SIZE,

    /**
     *
     */
    COACH,

    /**
     *
     */
    COACH_PORT,

    /**
     *
     */
    COACH_W_REFEREE,

    /**
     *
     */
    CONNECT_WAIT,

    /**
     *
     */
    CONTROL_RADIUS,

    /**
     *
     */
    DASH_ANGLE_STEP,

    /**
     *
     */
    DASH_POWER_RATE,

    /**
     *
     */
    DROP_BALL_TIME,

    /**
     *
     */
    EFFORT_DEC,

    /**
     *
     */
    EFFORT_DEC_THR,

    /**
     *
     */
    EFFORT_INC,

    /**
     *
     */
    EFFORT_INC_THR,

    /**
     *
     */
    EFFORT_INIT,

    /**
     *
     */
    EFFORT_MIN,

    /**
     *
     */
    EXTRA_HALF_TIME,

    /**
     *
     */
    EXTRA_STAMINA,

    /**
     *
     */
    FORBID_KICK_OFF_OFFSIDE,

    /**
     *
     */
    FREE_KICK_FAULTS,

    /**
     *
     */
    FREEFORM_SEND_PERIOD,

    /**
     *
     */
    FREEFORM_WAIT_PERIOD,

    /**
     *
     */
    FULLSTATE_L,

    /**
     *
     */
    FULLSTATE_R,

    /**
     *
     */
    GAME_LOG_COMPRESSION,

    /**
     *
     */
    GAME_LOG_DATED,

    /**
     *
     */
    GAME_LOG_DIR,

    /**
     *
     */
    GAME_LOG_FIXED,

    /**
     *
     */
    GAME_LOG_FIXED_NAME,

    /**
     *
     */
    GAME_LOG_VERSION,

    /**
     *
     */
    GAME_LOGGING,

    /**
     *
     */
    GAME_OVER_WAIT,

    /**
     *
     */
    GOAL_WIDTH,

    /**
     *
     */
    GOALIE_MAX_MOVES,

    /**
     *
     */
    HALF_TIME,

    /**
     *
     */
    HEAR_DECAY,

    /**
     *
     */
    HEAR_INC,

    /**
     *
     */
    HEAR_MAX,

    /**
     *
     */
    INERTIA_MOMENT,

    /**
     *
     */
    KEEPAWAY,

    /**
     *
     */
    KEEPAWAY_LENGTH,

    /**
     *
     */
    KEEPAWAY_LOG_DATED,

    /**
     *
     */
    KEEPAWAY_LOG_DIR,

    /**
     *
     */
    KEEPAWAY_LOG_FIXED,

    /**
     *
     */
    KEEPAWAY_LOG_FIXED_NAME,

    /**
     *
     */
    KEEPAWAY_LOGGING,

    /**
     *
     */
    KEEPAWAY_START,

    /**
     *
     */
    KEEPAWAY_WIDTH,

    /**
     *
     */
    KICK_OFF_WAIT,

    /**
     *
     */
    KICK_POWER_RATE,

    /**
     *
     */
    KICK_RAND,

    /**
     *
     */
    KICK_RAND_FACTOR_L,

    /**
     *
     */
    KICK_RAND_FACTOR_R,

    /**
     *
     */
    KICKABLE_MARGIN,

    /**
     *
     */
    LANDMARK_FILE,

    /**
     *
     */
    LOG_DATE_FORMAT,

    /**
     *
     */
    LOG_TIMES,

    /**
     *
     */
    MAX_BACK_TACKLE_POWER,

    /**
     *
     */
    MAX_DASH_ANGLE,

    /**
     *
     */
    MAX_DASH_POWER,

    /**
     *
     */
    MAX_GOAL_KICKS,

    /**
     *
     */
    MAX_TACKLE_POWER,

    /**
     *
     */
    MAXMOMENT,

    /**
     *
     */
    MAXNECKANG,

    /**
     *
     */
    MAXNECKMOMENT,

    /**
     *
     */
    MAXPOWER,

    /**
     *
     */
    MIN_DASH_ANGLE,

    /**
     *
     */
    MIN_DASH_POWER,

    /**
     *
     */
    MINMOMENT,

    /**
     *
     */
    MINNECKANG,

    /**
     *
     */
    MINNECKMOMENT,

    /**
     *
     */
    MINPOWER,

    /**
     *
     */
    NR_EXTRA_HALFS,

    /**
     *
     */
    NR_NORMAL_HALFS,

    /**
     *
     */
    OFFSIDE_ACTIVE_AREA_SIZE,

    /**
     *
     */
    OFFSIDE_KICK_MARGIN,

    /**
     *
     */
    OLCOACH_PORT,

    /**
     *
     */
    OLD_COACH_HEAR,

    /**
     *
     */
    PEN_ALLOW_MULT_KICKS,

    /**
     *
     */
    PEN_BEFORE_SETUP_WAIT,

    /**
     *
     */
    PEN_COACH_MOVES_PLAYERS,

    /**
     *
     */
    PEN_DIST_X,

    /**
     *
     */
    PEN_MAX_EXTRA_KICKS,

    /**
     *
     */
    PEN_MAX_GOALIE_DIST_X,

    /**
     *
     */
    PEN_NR_KICKS,

    /**
     *
     */
    PEN_RANDOM_WINNER,

    /**
     *
     */
    PEN_READY_WAIT,

    /**
     *
     */
    PEN_SETUP_WAIT,

    /**
     *
     */
    PEN_TAKEN_WAIT,

    /**
     *
     */
    PENALTY_SHOOT_OUTS,

    /**
     *
     */
    PLAYER_ACCEL_MAX,

    /**
     *
     */
    PLAYER_DECAY,

    /**
     *
     */
    PLAYER_RAND,

    /**
     *
     */
    PLAYER_SIZE,

    /**
     *
     */
    PLAYER_SPEED_MAX,

    /**
     *
     */
    PLAYER_SPEED_MAX_MIN,

    /**
     *
     */
    PLAYER_WEIGHT,

    /**
     *
     */
    POINT_TO_BAN,

    /**
     *
     */
    POINT_TO_DURATION,

    /**
     *
     */
    PORT,

    /**
     *
     */
    PRAND_FACTOR_L,

    /**
     *
     */
    PRAND_FACTOR_R,

    /**
     *
     */
    PROFILE,

    /**
     *
     */
    PROPER_GOAL_KICKS,

    /**
     *
     */
    QUANTIZE_STEP,

    /**
     *
     */
    QUANTIZE_STEP_L,

    /**
     *
     */
    RECORD_MESSAGES,

    /**
     *
     */
    RECOVER_DEC,

    /**
     *
     */
    RECOVER_DEC_THR,

    /**
     *
     */
    RECOVER_INIT,

    /**
     *
     */
    RECOVER_MIN,

    /**
     *
     */
    RECV_STEP,

    /**
     *
     */
    SAY_COACH_CNT_MAX,

    /**
     *
     */
    SAY_COACH_MSG_SIZE,

    /**
     *
     */
    SAY_MSG_SIZE,

    /**
     *
     */
    SEND_COMMS,

    /**
     *
     */
    SEND_STEP,

    /**
     *
     */
    SEND_VI_STEP,

    /**
     *
     */
    SENSE_BODY_STEP,

    /**
     *
     */
    SIDE_DASH_RATE,

    /**
     *
     */
    SIMULATOR_STEP,

    /**
     *
     */
    SLOW_DOWN_FACTOR,

    /**
     *
     */
    SLOWNESS_ON_TOP_FOR_LEFT_TEAM,

    /**
     *
     */
    SLOWNESS_ON_TOP_FOR_RIGHT_TEAM,

    /**
     *
     */
    STAMINA_CAPACITY,

    /**
     *
     */
    STAMINA_INC_MAX,

    /**
     *
     */
    STAMINA_MAX,

    /**
     *
     */
    START_GOAL_L,

    /**
     *
     */
    START_GOAL_R,

    /**
     *
     */
    STOPPED_BALL_VEL,

    /**
     *
     */
    SYNCH_MICRO_SLEEP,

    /**
     *
     */
    SYNCH_MODE,

    /**
     *
     */
    SYNCH_OFFSET,

    /**
     *
     */
    SYNCH_SEE_OFFSET,

    /**
     *
     */
    TACKLE_BACK_DIST,

    /**
     *
     */
    TACKLE_CYCLES,

    /**
     *
     */
    TACKLE_DIST,

    /**
     *
     */
    TACKLE_EXPONENT,

    /**
     *
     */
    TACKLE_POWER_RATE,

    /**
     *
     */
    TACKLE_WIDTH,

    /**
     *
     */
    TEAM_ACTUATOR_NOISE,

    /**
     *
     */
    TEAM_L_START,

    /**
     *
     */
    TEAM_R_START,

    /**
     *
     */
    TEXT_LOG_COMPRESSION,

    /**
     *
     */
    TEXT_LOG_DATED,

    /**
     *
     */
    TEXT_LOG_DIR,

    /**
     *
     */
    TEXT_LOG_FIXED,

    /**
     *
     */
    TEXT_LOG_FIXED_NAME,

    /**
     *
     */
    TEXT_LOGGING,

    /**
     *
     */
    USE_OFFSIDE,

    /**
     *
     */
    VERBOSE,

    /**
     *
     */
    VISIBLE_ANGLE,

    /**
     *
     */
    VISIBLE_DISTANCE,

    /**
     *
     */
    WIND_ANG,

    /**
     *
     */
    WIND_DIR,

    /**
     *
     */
    WIND_FORCE,

    /**
     *
     */
    WIND_NONE,

    /**
     *
     */
    WIND_RAND,

    /**
     *
     */
    WIND_RANDOM;
} public enum ViewAngle {

    /**
     * A narrow view angle.
     */
    NARROW,

    /**
     * A normal view angle.
     */
    NORMAL,

    /**
     * A wide view angle.
     */
    WIDE
} public enum ViewQuality {

    /**
     * A high view quality.
     */
    HIGH,

    /**
     * A low view quality.
     */
    LOW
} public enum Warning {

    /**
     * You cannot substitute the goalie.
     */
    CANNOT_CHANGE_GOALIE,

    /**
     * You cannot substitute the goalie during penalty shootouts.
     */
    CANNOT_CHANGE_GOALIE_WHILE_PENALTY_TAKEN,

    /**
     * You cannot substitute the goalie whilst game mode is play on.
     */
    CANNOT_CHANGE_GOALIE_WHILE_PLAYON,

    /**
     * Cannot say whilst game mode is play on.
     */
    CANNOT_SAY_WHILE_PLAYON,

    /**
     * Cannot substitute a player during penalty shootouts.
     */
    CANNOT_SUB_WHILE_PENALTY_SHOOTOUTS,

    /**
     * Cannot substitute a player whilst game mode is play on.
     */
    CANNOT_SUB_WHILE_PLAYON,

    /**
     * Compression isn't supported.
     */
    COMPRESSION_UNSUPPORTED,

    /**
     * The XPM tile location sent to the server was invalid.
     */
    INVALID_TILE_LOCATION,

    /**
     * The XPM tile size sent to the server was an invalid size.
     */
    INVALID_TILE_SIZE,

    /**
     * You already have the maximum type of that player on the field.
     */
    MAX_OF_THAT_TYPE_ON_FIELD,

    /**
     * The message you sent wasn't null terminated.
     */
    MESSAGE_NOT_NULL_TERMINATED,

    /**
     * There are no players of that type left.
     */
    NO_LEFT_OF_THAT_TYPE,

    /**
     * You have no substitutes left.
     */
    NO_SUBS_LEFT,

    /**
     * The player you tried to access doesn't exist.
     */
    NO_SUCH_PLAYER,

    /**
     * The team you tried to access doesn't exist.
     */
    NO_TEAM_FOUND,

    /**
     * This action can only be performed before kick off.
     */
    ONLY_BEFORE_KICK_OFF;
}
import com.github.robocup_atan.atan.model.enums.Line;
import com.github.robocup_atan.atan.model.enums.Ok;
import com.github.robocup_atan.atan.model.enums.PlayMode;
import com.github.robocup_atan.atan.model.enums.RefereeMessage;
import com.github.robocup_atan.atan.model.enums.ServerParams;
import com.github.robocup_atan.atan.model.enums.ViewAngle;
import com.github.robocup_atan.atan.model.enums.ViewQuality;
import com.github.robocup_atan.atan.model.enums.Warning;
import java.util.HashMap;
import com.github.robocup_atan.atan.model.enums.Errors;
import com.github.robocup_atan.atan.model.enums.Flag;
package com.github.robocup_atan.atan.model;

/*
 * #%L
 * Atan
 * %%
 * Copyright (C) 2003 - 2014 Atan
 * %%
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 * #L%
 */

//~--- non-JDK imports --------------------------------------------------------


//~--- JDK imports ------------------------------------------------------------


/**
 * Interface that has to be implemented in order to control players. The methods
 * are run in a cycle whenever a see command arrives from SServer. At first preInfo()
 * is invoked. then the info*() methods are called according to what kind of objects
 * are currently seen or what other commands where received from the server. At last
 * postInfo() is called. All objects are relative to the current side of the controller.
 *
 * @author Atan
 */
public interface ControllerPlayer {

    /**
     * This is the method called before the controller receives all the new visual
     * information.
     */
    public void preInfo();

    /**
     * This is the method called one all the visual information
     * has been processed.
     */
    public void postInfo();

    /**
     * Returns the current instance of the ActionsPlayer.
     *
     * @return ActionsPlayer.
     */
    public ActionsPlayer getPlayer();

    /**
     * Sets the player that the controller is controlling.
     *
     * @param c ActionsPlayer.
     */
    public void setPlayer(ActionsPlayer c);

    /**
     * Get the players type, if set.
     *
     * @return The players type (any string).
     */
    public String getType();

    /**
     * Set the players type.
     *
     * @param newType what the type will now be
     */
    public void setType(String newType);

    /**
     * The controller is informed when one of the flags along the right touchline
     * is in sight. The flags are positioned 5m behind the touchline.
     *
     * @param flag possible values: OWN_50, OWN_40, OWN_30, OWN_20, OWN_10, CENTER,
     * OTHER_10, OTHER_20, OTHER_30, OTHER_40, OTHER_50
     * @param distance The distance to the flag.
     * @param direction The direction of the flag.
     * @param distChange a double.
     * @param dirChange a double.
     * @param bodyFacingDirection a double.
     * @param headFacingDirection a double.
     */
    public void infoSeeFlagRight(Flag flag, double distance, double direction, double distChange, double dirChange,
                                 double bodyFacingDirection, double headFacingDirection);

    /**
     * The controller is informed when one of the flags along the left touchline
     * is in sight. The flags are positioned 5m behind the touchline.
     *
     * @param flag possible values: OWN_50, OWN_40, OWN_30, OWN_20, OWN_10, CENTER
     * OTHER_10, OTHER_20, OTHER_30, OTHER_40, OTHER_50
     * @param distance The distance to the flag.
     * @param direction The direction of the flag.
     * @param distChange a double.
     * @param dirChange a double.
     * @param bodyFacingDirection a double.
     * @param headFacingDirection a double.
     */
    public void infoSeeFlagLeft(Flag flag, double distance, double direction, double distChange, double dirChange,
                                double bodyFacingDirection, double headFacingDirection);

    /**
     * The controller is informed when one of the flags behind our teams
     * goal is in sight. These flags are positioned 5m behind the goal line.
     *
     * @param flag possible values: LEFT_10, LEFT_20, LEFT_30, CENTER,
     * RIGHT_10, RIGHT_20, RIGHT_30
     * @param distance The distance to the flag.
     * @param direction The direction of the flag.
     * @param distChange a double.
     * @param dirChange a double.
     * @param bodyFacingDirection a double.
     * @param headFacingDirection a double.
     */
    public void infoSeeFlagOwn(Flag flag, double distance, double direction, double distChange, double dirChange,
                               double bodyFacingDirection, double headFacingDirection);

    /**
     * The controller is informed when one of the flags behind the other teams
     * goal is in sight. These flags are positioned 5m behind the goal line.
     *
     * @param flag possible values: LEFT_10, LEFT_20, LEFT_30, CENTER,
     * RIGHT_10, RIGHT_20, RIGHT_30
     * @param distance The distance to the flag.
     * @param direction The direction of the flag.
     * @param distChange a double.
     * @param dirChange a double.
     * @param bodyFacingDirection a double.
     * @param headFacingDirection a double.
     */
    public void infoSeeFlagOther(Flag flag, double distance, double direction, double distChange, double dirChange,
                                 double bodyFacingDirection, double headFacingDirection);

    /**
     * The controller is informed when one of the flags on the center line are
     * in sight.
     *
     * @param flag possible values: LEFT, CENTER, RIGHT
     * @param distance The distance to the flag.
     * @param direction The direction of the flag.
     * @param distChange a double.
     * @param dirChange a double.
     * @param bodyFacingDirection a double.
     * @param headFacingDirection a double.
     */
    public void infoSeeFlagCenter(Flag flag, double distance, double direction, double distChange, double dirChange,
                                  double bodyFacingDirection, double headFacingDirection);

    /**
     * The controller is informed that one of our teams corner flags is
     * in sight.
     *
     * @param flag possible values: LEFT, RIGHT
     * @param distance The distance to the flag.
     * @param direction The direction of the flag.
     * @param distChange a double.
     * @param dirChange a double.
     * @param bodyFacingDirection a double.
     * @param headFacingDirection a double.
     */
    public void infoSeeFlagCornerOwn(Flag flag, double distance, double direction, double distChange, double dirChange,
                                     double bodyFacingDirection, double headFacingDirection);

    /**
     * The controller is informed that one of the other teams corner flags is
     * in sight.
     *
     * @param flag possible values: LEFT, RIGHT
     * @param distance The distance to the flag.
     * @param direction The direction of the flag.
     * @param distChange a double.
     * @param dirChange a double.
     * @param bodyFacingDirection a double.
     * @param headFacingDirection a double.
     */
    public void infoSeeFlagCornerOther(Flag flag, double distance, double direction, double distChange,
                                       double dirChange, double bodyFacingDirection, double headFacingDirection);

    /**
     * The controller is informed that one of our teams penalty box
     * flags is in sight. The flags map the outer most corners of the penalty
     * box and the centre point between these corners.
     *
     * @param flag possible values: LEFT, CENTER, RIGHT
     * @param distance The distance to this flag.
     * @param direction The direction of this flag.
     * @param distChange a double.
     * @param dirChange a double.
     * @param bodyFacingDirection a double.
     * @param headFacingDirection a double.
     */
    public void infoSeeFlagPenaltyOwn(Flag flag, double distance, double direction, double distChange,
                                      double dirChange, double bodyFacingDirection, double headFacingDirection);

    /**
     * The controller is informed that one of the other teams penalty box
     * flags is in sight. The flags map the outer most corners of the penalty
     * box and the centre point between these corners.
     *
     * @param flag possible values: LEFT, CENTER, RIGHT
     * @param distance The distance to this flag.
     * @param direction The direction of this flag.
     * @param distChange a double.
     * @param dirChange a double.
     * @param bodyFacingDirection a double.
     * @param headFacingDirection a double.
     */
    public void infoSeeFlagPenaltyOther(Flag flag, double distance, double direction, double distChange,
            double dirChange, double bodyFacingDirection, double headFacingDirection);

    /**
     * The controller is informed that one of our teams goal flags
     * is in sight. The flags map the posts of the goal and the center
     * of the goal.
     *
     * @param flag possible values: LEFT, CENTER, RIGHT
     * @param distance The distance to this flag.
     * @param direction The direction of the flag.
     * @param distChange a double.
     * @param dirChange a double.
     * @param bodyFacingDirection a double.
     * @param headFacingDirection a double.
     */
    public void infoSeeFlagGoalOwn(Flag flag, double distance, double direction, double distChange, double dirChange,
                                   double bodyFacingDirection, double headFacingDirection);

    /**
     * The controller is informed that one of the other teams goal flags
     * is in sight. The flags map the posts of the goal and the center
     * of the goal.
     *
     * @param flag possible values: LEFT, CENTER, RIGHT
     * @param distance The distance to this flag.
     * @param direction The direction of the flag.
     * @param distChange a double.
     * @param dirChange a double.
     * @param bodyFacingDirection a double.
     * @param headFacingDirection a double.
     */
    public void infoSeeFlagGoalOther(Flag flag, double distance, double direction, double distChange, double dirChange,
                                     double bodyFacingDirection, double headFacingDirection);

    /**
     * The controller is informed that one of the pitch lines are in sight.
     *
     * @param line a {@link com.github.robocup_atan.atan.model.enums.Line} object.
     * @param distance The distance to the line.
     * @param direction The direction of the line.
     * @param distChange a double.
     * @param dirChange a double.
     * @param bodyFacingDirection a double.
     * @param headFacingDirection a double.
     */
    public void infoSeeLine(Line line, double distance, double direction, double distChange, double dirChange,
                            double bodyFacingDirection, double headFacingDirection);

    /**
     * The controller is informed that one of the other teams players is in sight.
     *
     * @param number The ID of the player (from 1 to 11)
     * @param goalie If the seen player is a goalie. False if unknown.
     * @param distance The distance to the player.
     * @param direction The direction of the player.
     * @param distChange a double.
     * @param dirChange a double.
     * @param bodyFacingDirection a double.
     * @param headFacingDirection a double.
     */
    public void infoSeePlayerOther(int number, boolean goalie, double distance, double direction, double distChange,
                                   double dirChange, double bodyFacingDirection, double headFacingDirection);

    /**
     * The controller is informed that one of it's own team is in sight.
     *
     * @param number The ID of the player (from 1 to 11)
     * @param goalie If the seen player is a goalie. False if unknown.
     * @param distance The distance to the player.
     * @param direction The direction of the player.
     * @param distChange a double.
     * @param dirChange a double.
     * @param bodyFacingDirection a double.
     * @param headFacingDirection a double.
     */
    public void infoSeePlayerOwn(int number, boolean goalie, double distance, double direction, double distChange,
                                 double dirChange, double bodyFacingDirection, double headFacingDirection);

    /**
     * The controller is informed that the Ball is in sight.
     *
     * @param distance The distance to the ball.
     * @param direction The direction of the ball.
     * @param distChange a double.
     * @param dirChange a double.
     * @param bodyFacingDirection a double.
     * @param headFacingDirection a double.
     */
    public void infoSeeBall(double distance, double direction, double distChange, double dirChange,
                            double bodyFacingDirection, double headFacingDirection);

    /**
     * The controller is informed when a referee message is broadcast.
     *
     * @param refereeMessage possible values: FOUL_OWN, FOUL_OTHER,
     * HALF_TIME, TIME_UP, TIME_UP_WITHOUT_A_TEAM,
     * TIME_EXTENDED, DROP_BALL, OFFSIDE_OWN, OFFSIDE_OTHER
     */
    public void infoHearReferee(RefereeMessage refereeMessage);

    /**
     * The controller is informed when a play mode message is broadcast.
     *
     * @param playMode possible values: BEFORE_KICK_OFF, TIME_OVER, PLAY_ON,
     * KICK_OFF_OWN, KICK_OFF_OTHER, FREE_KICK_OWN,
     * FREE_KICK_OTHER, GOAL_KICK_OWN, CORNER_KICK_OTHER,
     * GOAL_KICK_OWN, GOAL_KICK_OTHER, GOAL_OWN, GOAL_OTHER
     */
    public void infoHearPlayMode(PlayMode playMode);

    /**
     * The controller is informed when it hears a message from another player.
     *
     * @param direction The direction from which the message originated.
     * @param message The actual message said.
     */
    public void infoHearPlayer(double direction, String message);

    /**
     * The controller is informed when it hears a message from itself.
     *
     * @param message The actual message said.
     */
    public void infoHearSelf(String message);

    /**
     * The player is informed when it hears an error message.
     *
     * @param error The error to handle
     */
    public void infoHearError(Errors error);

    /**
     * The player is informed when it hears an ok message.
     *
     * @param ok The message to handle.
     */
    public void infoHearOk(Ok ok);