private void btnGo10_Click(object sender, EventArgs e) { RobotMovement robot = new RobotMovement(getCordnates(), 10); Point location = robot.moveRobot(); lblArrow.Location = location; }
private void bntReset_Click(object sender, EventArgs e) { //reset location and direction lblArrow.Location = new Point(95, 100); RobotMovement robot = new RobotMovement("NORTH"); lblArrow.Text = Convert.ToChar(233).ToString(); }
public Form1() { InitializeComponent(); //Set iniital position updateCords(new Point(0, 0)); RobotMovement robot = new RobotMovement(getCordnates(), "NORTH"); lblArrow.Text = Convert.ToChar(233).ToString(); //Declare event handler, update cords when cords change lblArrow.Move += new EventHandler(HandleChange); }
private void btnWest_Click(object sender, EventArgs e) { RobotMovement robot = new RobotMovement("WEST"); lblArrow.Text = Convert.ToChar(231).ToString(); }
private void btnSouth_Click(object sender, EventArgs e) { RobotMovement robot = new RobotMovement("SOUTH"); lblArrow.Text = Convert.ToChar(234).ToString(); }