Beispiel #1
0
        public void StartGameAction(string gameMode)
        {
            switch (gameMode)
            {
            case "Threes":
                game = new Threes();
                break;

            case "Fives":
                game = new Fives();
                break;

            case "Eights":
                game = new Eights();
                break;

            case "2048":
                game = new TwentyFortyEight();
                break;
            }
            if (game != null)
            {
                NextTileVisibility        = game.NextNumberVisible ? Visibility.Visible : Visibility.Hidden;
                ScoreVisibility           = game.ScoreVisible ? Visibility.Visible : Visibility.Hidden;
                QuitCurrentGameVisibility = Visibility.Visible;
                HideGameSelection         = true;
                if (InitializeBoard != null)
                {
                    InitializeBoard();
                    MoveCommand.RaiseCanExecuteChanged();
                }
            }
        }
Beispiel #2
0
        public void ThreesShouldReturnSumOf3S(List <int> rolledDice, int expectedOutcome)
        {
            var threes = new Threes();
            var result = threes.CalculateScore(rolledDice);

            Assert.Equal(expectedOutcome, result);
        }
Beispiel #3
0
 void Start()
 {
     _threes = new Threes();
     _logicView.SetLogic(_threes);
 }