コード例 #1
0
ファイル: ScoreBoardTest.cs プロジェクト: mangaalex95/TP1_POO
        public void AddSmallAsteroid()
        {
            //Arrange
            ScoreBoard scoreBoard = new ScoreBoard();
            Asteroid bigAsteroid = new Asteroid(0,TimeSpan.Zero, Asteroid.Size.SMALL);

            //Action
            scoreBoard.AddPoints(bigAsteroid, false);

            //Assert
            Assert.AreEqual(100, scoreBoard.CurrentScore);
        }
コード例 #2
0
ファイル: ScoreBoardTest.cs プロジェクト: mangaalex95/TP1_POO
        public void AddCarrierShip()
        {
            //Arrange
            ScoreBoard scoreBoard = new ScoreBoard();
            CarrierEnemyShip carrier = (CarrierEnemyShip) ShipFactory.CreateCarrierShip();

            //Action
            scoreBoard.AddPoints(carrier, false);

            //Assert
            Assert.AreEqual(1000, scoreBoard.CurrentScore);
        }
コード例 #3
0
ファイル: ScoreBoardTest.cs プロジェクト: mangaalex95/TP1_POO
        public void AddMediumAsteroid()
        {
            //Arrange
            ScoreBoard scoreBoard = new ScoreBoard();
            Asteroid bigAsteroid = new Asteroid(0, TimeSpan.Zero, Asteroid.Size.MEDIUM);

            //Action
            scoreBoard.AddPoints(bigAsteroid, false);

            //Assert
            Assert.AreEqual(50, scoreBoard.CurrentScore);
        }
コード例 #4
0
ファイル: ScoreBoardTest.cs プロジェクト: mangaalex95/TP1_POO
        public void AddSmallShip()
        {
            //Arrange
            ScoreBoard scoreBoard = new ScoreBoard();
            SmallEnemyShip smallShip = (SmallEnemyShip) ShipFactory.CreateSmallShip();

            //Action
            scoreBoard.AddPoints(smallShip, false);

            //Assert
            Assert.AreEqual(200, scoreBoard.CurrentScore);
        }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GameObjectManager"/> class.
 /// </summary>
 public GameObjectManager()
 {
     scoreBoard = new ScoreBoard();
 }