Exemple #1
0
            public void StartNewGame()
            {
                redPlayer = new Player(this, Players.Red, takenChessmenPic, lostChessmenPic, "Красный игрок");
                yellowPlayer = new Player(this, Players.Yellow, takenChessmenPic, lostChessmenPic, "Желтый игрок");
                redPlayer.SetAlly(yellowPlayer);
                yellowPlayer.SetAlly(redPlayer);
                blackPlayer = new Player(this, Players.Black, takenChessmenPic, lostChessmenPic, "Черный игрок");
                bluePlayer = new Player(this, Players.Blue, takenChessmenPic, lostChessmenPic, "Синий игрок");
                blackPlayer.SetAlly(bluePlayer);
                bluePlayer.SetAlly(blackPlayer);
                //dopilit'
                turn = Players.Black;
                ToggleTurn();

                logTurn = "";
                logBuffer = "";
                chessboard = new Chessboard(this, 0, 0, chessboardPic.Width, chessboardPic.Height, arrangement);
                chessboard.SetStatusBar(statusBar);
                chessboardPic.MouseClick -= chessboardPic_MouseClick;
                chessboardPic.MouseClick += chessboardPic_MouseClick;
                chessboardPic.MouseMove -= chessboardPic_MouseMove;
                chessboardPic.MouseMove += chessboardPic_MouseMove;
                surrenderButton.Click -= surrenderButton_Click;
                surrenderButton.Click += surrenderButton_Click;
                prisonersChangeButton.Click -= prisonersChangeButton_Click;
                prisonersChangeButton.Click += prisonersChangeButton_Click;
                chessboard.ShowChessboard(chessboardPic);
                numberOfTurn = 1;
                //dopilit'
            }