예제 #1
0
        /*
         * Method for controller to start new game 
         */
        public void NewGame()
        {
            playerHasPassed[Color.White] = false;
            playerHasPassed[Color.Black] = false;

            turnHolder.Reset();
            
            NewGameStarted?.Invoke(this, new EventArgs());

            SetStartBoardPosition();

            countHolder.Reset();

            CountChanged?.Invoke(this, new CountChangedEventArgs
            {
                CountWhite = countHolder.GetPlayerCount(Color.White),
                CountBlack = countHolder.GetPlayerCount(Color.Black),
            });

            FinishTurnAndMoveOn();
        }
예제 #2
0
 protected virtual void OnNewGameStarted(object source)
 {
     NewGameStarted?.Invoke(source);
 }
예제 #3
0
 public static void OnNewGameStarted(PersonalizedForSpecificPlayerStartGameDataRequest args)
 {
     NewGameStarted?.Invoke(null, new OpenNewGameWindowEventArgs {
         ReceivedData = args
     });
 }