public Form1() { InitializeComponent(); int x = rand.Next(0, 9); int y = rand.Next(0, 9); map.DrawMap(map1); state = map.GetMap(); player.Start(state[x, y], hunter.Images[2]); map.Generate_Obstacle(4, 4, 4, x, y); foreach (Button e in state) { e.BackColor = Color.Black; // e.KeyDown += Button1_KeyDown; e.Enabled = false; } map.UpdateMap(state[x, y], tbstatus, Keys.Q, score, false, player.Get_Score()); score.Text = "Score: " + player.Get_Score(); pr = new Process(player); VISITED_ROOMS = 0; label1.Text = "MAXIMUM ROOMS: " + MAX_ROOMS; label3.Text = "VISITED ROOMS: " + VISITED_ROOMS; }