예제 #1
0
파일: App.xaml.cs 프로젝트: nyoshi/strasgo
        public void ClearBoard(int handicap, int minutes, bool isTwoHumanPlayers, int boardSize)
        {
            // set the game settings
            m_gameInfo = new GoGameInfo();
            m_gameInfo.Size = boardSize;
            m_gameInfo.Komi = 0.0f;
            m_gameInfo.Handicap = handicap;
            m_gameInfo.TimeSettings.MainTime = new TimeSpan(0, minutes, 0);
            m_gameInfo.TimeSettings.Byoyomi = new TimeSpan(0, 0, 5);
            m_gameInfo.TimeSettings.NumberOfMovesPerByoyomi = 1;

            m_game = new GoGame(m_gameInfo);
            m_game.GameIsOver += m_game_GameIsOver;

            StartPachi();

            if (m_gtpEngine != null)
            {
                if (!isTwoHumanPlayers)
                {
                    m_gtpEngine.SetGameInfo(m_gameInfo);
                }
            }
        }
예제 #2
0
파일: App.xaml.cs 프로젝트: nyoshi/strasgo
 void m_game_GameIsOver(object sender, GoGame.GameResultEventArgs e)
 {
     if (GameIsOver != null)
     {
         GameIsOver(this, e);
     }
 }