public void TestLopezReggaeColocaUnaBombaMolotovYContinuaMoviendoseAlejandoseDelExplosivo()
        {
            Casilla posicion = Tablero.GetInstancia().Casilla(2, 2);
            lopezReggae = new LopezReggae(posicion);
            lopezReggae.LanzarExplosivo();

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

            lopezReggae.MoverAlEste();
            lopezReggae.MoverAlEste();
            lopezReggae.MoverAlNorte();

            // asserts
            Assert.IsTrue(posicion.TieneBomba());
            Assert.IsFalse(posicion.TienePersonaje());
            Assert.AreEqual(lopezReggae.Posicion().X, 1);
            Assert.AreEqual(lopezReggae.Posicion().Y, 6);
        }
        public void TestLopezReggaeAladoSeMueveHaciaArriba()
        {
            lopezReggaeAlado = new LopezReggaeAlado(Tablero.GetInstancia().Casilla(2, 2));
            lopezReggaeAlado.MoverAlNorte();

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

            // limpia el tablero
            Tablero.Vaciar();
        }
        public void TestLopezReggaeNoSePuedeMoverPorqueHayUnObstaculo()
        {
            lopezReggae = new LopezReggae(Tablero.GetInstancia().Casilla(2, 2));
            Obstaculo obstaculo = new ObstaculoDeCemento(Tablero.GetInstancia().Casilla(1, 2));

            lopezReggae.MoverAlNorte();

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

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

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

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