Esempio n. 1
0
        private void pictureBox1_MouseClick(object sender, MouseEventArgs e)
        {
            int[] check2 = game.FindCoords(e.X, e.Y);
            pictureBox1.Image = game.Accentuation(e.X, e.Y);
            if (check2[2] != -1)
            {
                if (check2[2] == 1 || check2[2] == 7 || check2[2] == 6 || (check2[2] >= 20 && check2[2] <= 32 && check2[2] != 24))
                {
                    if (check2[2] == 25 || check2[2] == 26 || check2[2] == 27 || check2[2] == 30)
                    {
                        MessageBox.Show("На этой территории уже построено здание");
                    }
                    else
                    {
                        construction.InfC(check2[2]);
                        construction.Info();
                        construction.ShowDialog();
                        construction.Clean();
                        if (construction.GetCheck())
                        {
                            check.Redraw(game.SendI()[0], game.SendI()[1], construction.GetBilding());
                            construction.SetCheck();
                        }

                        if (construction.resources.numberSawmill == fw)
                        {
                            dialogs.LittleO2();
                            fw++;
                        }

                        if (construction.resources.numberPlant == fp)
                        {
                            dialogs.Heat();
                            fp++;
                        }
                    }
                }
                else
                {
                    MessageBox.Show("Это не ваша территория.\nВыбирете свою ячейку");
                }
            }
            Conclusion();
            game.GetMass(check.GetMap(), check.GetWater());
            pictureBox1.Image = game.RenderMap();
        }