public void TestCanMoveDownNotOK04() { Tetromino block = new Tetromino(4, 237483878, TetrominoType.Square); TetrisGame game = new TetrisGame(); Assert.IsFalse(block.CanMoveDown(game)); }
public void TestCanMoveDownNotOK03() { Tetromino block = new Tetromino(1, TetrisGame.NB_ROWS - 2, TetrominoType.Square); TetrisGame game = new TetrisGame(); Assert.IsFalse(block.CanMoveDown(game)); }
public void TestCanMoveDownOK01( ) { Tetromino block = new Tetromino(7, 0, TetrominoType.Square); TetrisGame game = new TetrisGame(); Assert.IsTrue(block.CanMoveDown(game)); }
public void TestCanMoveDownNotOK02( ) { Tetromino block = new Tetromino(1, TetrisGame.NB_ROWS - 3, TetrominoType.Square); TetrisGame game = new TetrisGame( ); game.FreezeContent(TetrisGame.NB_ROWS - 1, 1); Assert.IsFalse(block.CanMoveDown(game)); }
/// <summary> /// Sets the last move value in the result /// </summary> /// <param name="moveResult"></param> private void SetLastMove(ChangeResult moveResult) { if (moveResult == null) { return; } moveResult.LastMove = !current.CanMoveDown(); }