public void TestLopezReggaeAladoColocaUnaBombaMolotovYContinuaMoviendoseAlejandoseDelExplosivo()
        {
            Casilla posicion = Tablero.GetInstancia().Casilla(2, 2);
            lopezReggaeAlado = new LopezReggaeAlado(posicion);
            lopezReggaeAlado.LanzarExplosivo();

            // asserts
            Assert.IsTrue(posicion.TieneBomba());
            Assert.IsTrue(posicion.TienePersonaje());

            lopezReggaeAlado.MoverAlNorte();
            lopezReggaeAlado.MoverAlOeste();

            // asserts
            Assert.IsTrue(posicion.TieneBomba());
            Assert.IsFalse(posicion.TienePersonaje());
            Assert.AreEqual(lopezReggaeAlado.Posicion().X, 1);
            Assert.AreEqual(lopezReggaeAlado.Posicion().Y, 1);

            // limpia el tablero
            Tablero.Vaciar();
        }
예제 #2
0
        public void TestCecilioSeMueveHaciaLaIzquierda()
        {
            cecilio = new Cecilio(Tablero.GetInstancia().Casilla(2, 2));
            cecilio.MoverAlOeste();

            // asserts
            Assert.AreEqual(cecilio.Posicion().X, 2);
            Assert.AreEqual(cecilio.Posicion().Y, 1);

            // limpia el tablero
            Tablero.Vaciar();
        }
        public void TestLopezReggaeAladoSeMueveHacialaIzquierda()
        {
            lopezReggaeAlado = new LopezReggaeAlado(Tablero.GetInstancia().Casilla(2, 2));
            lopezReggaeAlado.MoverAlOeste();

            // asserts
            Assert.AreEqual(lopezReggaeAlado.Posicion().X, 2);
            Assert.AreEqual(lopezReggaeAlado.Posicion().Y, 1);

            // limpia el tablero
            Tablero.Vaciar();
        }
예제 #4
0
        public void TestCecilioNoSePuedeMoverPorqueHayUnObstaculo()
        {
            cecilio = new Cecilio(Tablero.GetInstancia().Casilla(2, 2));
            Obstaculo obstaculo = new ObstaculoDeLadrillo(Tablero.GetInstancia().Casilla(2, 1));

            cecilio.MoverAlOeste();

            // asserts
            Assert.AreEqual(cecilio.Posicion().X, 2);
            Assert.AreEqual(cecilio.Posicion().Y, 2);

            // limpia el tablero
            Tablero.Vaciar();
        }