コード例 #1
0
ファイル: Game.cs プロジェクト: ashein60/Reversi
        public static void GetNewScore(Grid Grid1, Label scoreBlack, Label scoreWhite)
        {
            Game.scoreBlack = 0;
            Game.scoreWhite = 0;

            for (int y = 0; y < Grid.GridSize; y++)
            {
                for (int x = 0; x < Grid.GridSize; x++)
                {
                    if (Grid1.Squares[y, x].Status == "Black")
                    {
                        Game.scoreBlack++;
                    }
                    else if (Grid1.Squares[y, x].Status == "White")
                    {
                        Game.ScoreWhite++;
                    }
                }
            }

            Decorations.UpdateScoreBoard(scoreBlack, scoreWhite);
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: ashein60/Reversi
        private void Paint_Everything(object sender, PaintEventArgs e)
        {
            Grid1.Paint_Grid(e);

            Decorations.Paint_Decorations(e); //displays whose turn it is
        }