public static void StartRobot() { for (int i = 0; i < 5; i++) { for (int j = 0; j < 5; j++) { currentRoomForRobot[i, j] = 0; } } ClassLogics.PlaceWhereRobot(); }
private void btStart_Click(object sender, EventArgs e) { SetRobot(); if (ClassRoom.currentRoom[ClassRobot.currentLocation[0], ClassRobot.currentLocation[1]] == true) { ClassRoom.startRobot = true; button00.BackColor = button00.BackColor = button01.BackColor = button02.BackColor = button03.BackColor = button04.BackColor = button10.BackColor = button11.BackColor = button12.BackColor = button13.BackColor = button14.BackColor = button20.BackColor = button21.BackColor = button22.BackColor = button23.BackColor = button24.BackColor = button30.BackColor = button31.BackColor = button32.BackColor = button33.BackColor = button34.BackColor = button40.BackColor = button41.BackColor = button42.BackColor = button43.BackColor = button44.BackColor = Color.Gray; ClassRobot.StartRobot(); PigmentRoom(); ClassLogics.DoTheMove(); } else { MessageBox.Show("Установите робота на землю"); } }