Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                arena = Global.Arenas.GetArena(int.Parse(Request.QueryString["arena"]));
                ArenaView.Arena = arena;
            }
            catch (Exception)
            {
                Response.Redirect("ArenaList.aspx");
                return;
            }

            if (!IsPostBack)
            {
                UpdateRobotList();
                TextBoxName.Text = arena.ToString();

                TextBoxMaxAcceleration.Text = arena.RobotParameters.MaxAcceleration.ToString();
                TextBoxMaxSpeed.Text = arena.RobotParameters.MaxSpeed.ToString();
                TextBoxMinSpeed.Text = arena.RobotParameters.MinSpeed.ToString();
                TextBoxMaxSteerRate.Text = arena.RobotParameters.MaxSteerRate.ToString();
                TextBoxMaxSteer.Text = arena.RobotParameters.MaxSteer.ToString();
            }
        }
Ejemplo n.º 2
0
        internal Robot(Arena arena, string owner)
        {
            this.arena = arena;
            this.Color = Color.White;
            this.Owner = owner;
            this.Parameters = arena.RobotParameters;

            lock (typeof(Robot))
            {
                handle = nextRobot++;
            }

            allRobots.AddRobot(this);
        }