Example #1
0
        public void changeCircle(int col)
        {
            int    index;
            Circle circle;


            for (int i = rows - 1; i >= 0; i--)
            {
                index  = col * rows + i;
                circle = model.Circles[index];
                if (circle.Player == PlayerEnum.NONE)                 // ako je prazan krug
                {
                    circle.Player = CurrentPlayer;
                    if (checkGameOver())
                    {
                        NewGameExitDialog nged = new NewGameExitDialog(this, CurrentPlayer);
                        nged.ShowDialog();
                        return;
                    }
                    changeCurrentPlayer();
                    break;
                }
            }
        }
Example #2
0
 public NewGameExitViewModel(NewGameExitDialog _newGameExitDialog, Controller _controller)
 {
     newGameExitDialog = _newGameExitDialog;
     controller        = _controller;
 }