IncrementMoves() public method

Increments the moves in the current game by one.
public IncrementMoves ( ) : void
return void
示例#1
0
 public void TestIfResetMethodCorrectlyResetsTheUserMovesCount()
 {
     var gameModel = new GameModel();
     gameModel.IncrementMoves();
     gameModel.ResetUserMoves();
     Assert.AreEqual(0, gameModel.UserMovesCount);
 }
示例#2
0
        public void TestIfGetterEncapsulatesTheCurrentState()
        {
            var game = new GameModel();
            this.logic.RandomizeBalloonField(game.Field);
            this.memento.SaveState(game);
            var state = this.memento.GetState();

            state.Field[0, 0].Number = 99;

            Assert.AreNotEqual(game.Field[0, 0].Number, 99);

            var moves = state.UserMovesCount;

            game.IncrementMoves();
            var moves2 = game.UserMovesCount;

            Assert.AreNotEqual(moves, moves2);
        }
示例#3
0
 public void TestIfIncrementMovesMethodCorrectlyIncrementTheMovesCount()
 {
     var gameModel = new GameModel();
     gameModel.IncrementMoves();
     Assert.AreEqual(1, gameModel.UserMovesCount);
 }