Beispiel #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            var rounds = MainNavigator1.Navigator.RoundWithDetails((int)numberOfPlayoutsControl.Value);

            playoutListControl.Items.Clear();
            int playoutNumber = 1;
            var whiteTrigger  = FieldCoordinates.Get(0, 5);

            foreach (var round in rounds)
            {
                string trigger = " ";
                var    played  = round.Playout?.FirstOrDefault(m => whiteTrigger.Equals(m.Item1));

                if (played != null)
                {
                    if (played.Item2.CurrentPlayer.Opposite.Color.State == FieldState.White)
                    {
                        trigger = "*";
                    }
                }

                string result = round.GetLastGameState().GetWinner().Color.State == FieldState.Black ? "B" : "W";
                playoutListControl.Items.Add(new NamedObject <GoMctsRound>($"{playoutNumber:000} {result}{trigger}", round));
                playoutNumber++;
            }

            GoBoardControlFieldFeaturesHelper.RefreshBoard(goBoardControl1, MainNavigator1);
        }
Beispiel #2
0
 private void PlayoutNavigator_Forwarded(object sender, FieldCoordinates action)
 {
     GoBoardControlFieldFeaturesHelper.RefreshBoard(playoutBoardControl, PlayoutNavigator.CurrentNode);
 }
Beispiel #3
0
 private void PlayoutNavigator_Navigated(object sender, GameTreePath <FieldCoordinates> track)
 {
     GoBoardControlFieldFeaturesHelper.RefreshBoard(playoutBoardControl, PlayoutNavigator.CurrentNode);
 }
Beispiel #4
0
 private void MainNavigator_Forwarded(object sender, FieldCoordinates action)
 {
     GoBoardControlFieldFeaturesHelper.RefreshBoard(goBoardControl1, MainNavigator1);
 }
Beispiel #5
0
 private void MainNavigator_Navigated(object sender, GameTreePath <FieldCoordinates> track)
 {
     GoBoardControlFieldFeaturesHelper.RefreshBoard(goBoardControl1, MainNavigator1);
 }