public void Constructor()
 {
     var content = new JewelBlocksContent(new TestResolver());
     Assert.AreEqual("JewelBlocks_", content.Prefix);
     Assert.IsTrue(content.AreFiveBrickBlocksAllowed);
     Assert.IsFalse(content.DoBricksSplitInHalfWhenRowFull);
 }
Beispiel #2
0
		public void SetUp()
		{
			displayMode = ScreenSpace.Current.Viewport.Aspect >= 1.0f
				? Orientation.Landscape : Orientation.Portrait;
			content = new JewelBlocksContent();
			material = new Material(ShaderFlags.Position2DColoredTextured, "Block1");
		}
 public void AreFiveBrickBlocksAllowed()
 {
     var content = new JewelBlocksContent();
     Assert.IsTrue(content.AreFiveBrickBlocksAllowed);
     content.AreFiveBrickBlocksAllowed = false;
     Assert.IsFalse(content.AreFiveBrickBlocksAllowed);
 }
 public void DoBlocksStartInARandomColumn()
 {
     var content = new JewelBlocksContent();
     Assert.IsFalse(content.DoBlocksStartInARandomColumn);
     content.DoBlocksStartInARandomColumn = true;
     Assert.IsTrue(content.DoBlocksStartInARandomColumn);
 }
 public void DoBricksSplitInHalfOnExit()
 {
     var content = new JewelBlocksContent();
     Assert.IsFalse(content.DoBricksSplitInHalfWhenRowFull);
     content.DoBricksSplitInHalfWhenRowFull = true;
     Assert.IsTrue(content.DoBricksSplitInHalfWhenRowFull);
 }
Beispiel #6
0
 public void SetUp()
 {
     displayMode = ScreenSpace.Current.Viewport.Aspect >= 1.0f
                         ? Orientation.Landscape : Orientation.Portrait;
     content  = new JewelBlocksContent();
     material = new Material(ShaderFlags.Position2DColoredTextured, "Block1");
 }
        public void AreFiveBrickBlocksAllowed()
        {
            var content = new JewelBlocksContent();

            Assert.IsTrue(content.AreFiveBrickBlocksAllowed);
            content.AreFiveBrickBlocksAllowed = false;
            Assert.IsFalse(content.AreFiveBrickBlocksAllowed);
        }
        public void DoBricksSplitInHalfOnExit()
        {
            var content = new JewelBlocksContent();

            Assert.IsFalse(content.DoBricksSplitInHalfWhenRowFull);
            content.DoBricksSplitInHalfWhenRowFull = true;
            Assert.IsTrue(content.DoBricksSplitInHalfWhenRowFull);
        }
Beispiel #9
0
        public void Constructor()
        {
            var content = new JewelBlocksContent();

            Assert.AreEqual("JewelBlocks_", content.Prefix);
            Assert.IsTrue(content.AreFiveBrickBlocksAllowed);
            Assert.IsFalse(content.DoBricksSplitInHalfWhenRowFull);
        }
        public void DoBlocksStartInARandomColumn()
        {
            var content = new JewelBlocksContent();

            Assert.IsFalse(content.DoBlocksStartInARandomColumn);
            content.DoBlocksStartInARandomColumn = true;
            Assert.IsTrue(content.DoBlocksStartInARandomColumn);
        }
 public void SetUp()
 {
     displayMode = ScreenSpace.Current.Viewport.Aspect >= 1.0f
                         ? Orientation.Landscape : Orientation.Portrait;
     content    = new JewelBlocksContent();
     controller = new Controller(displayMode, content);
     sounds     = controller.Get <Soundbank>();
     grid       = controller.Get <Grid>();
 }
Beispiel #12
0
		public void SetUp()
		{
			displayMode = ScreenSpace.Current.Viewport.Aspect >= 1.0f
				? Orientation.Landscape : Orientation.Portrait;
			content = new JewelBlocksContent();
			controller = new Controller(displayMode, content);
			grid = controller.Get<Grid>();
			//fixedRandomScope = NUnit.Framework.Randomizer.Use(new FixedRandom());
		}
Beispiel #13
0
 public void SetUp()
 {
     displayMode = ScreenSpace.Current.Viewport.Aspect >= 1.0f
                         ? Orientation.Landscape : Orientation.Portrait;
     content    = new JewelBlocksContent();
     controller = new Controller(displayMode, content);
     grid       = controller.Get <Grid>();
     //fixedRandomScope = NUnit.Framework.Randomizer.Use(new FixedRandom());
 }
Beispiel #14
0
		public void SetUp()
		{
			displayMode = ScreenSpace.Current.Viewport.Aspect >= 1.0f
				? Orientation.Landscape : Orientation.Portrait;
			content = new JewelBlocksContent();
			controller = new Controller(displayMode, content);
			sounds = controller.Get<Soundbank>();
			grid = controller.Get<Grid>();
		}
 public void GetFilenameWithoutPrefix()
 {
     var content = new JewelBlocksContent { Prefix = "ABC" };
     Assert.AreEqual("DEF", content.GetFilenameWithoutPrefix("ABCDEF"));
     Assert.Throws<BlocksContent.FilenameWrongPrefixException>(
         () => content.GetFilenameWithoutPrefix("ADEF"));
     Assert.Throws<BlocksContent.FilenameWrongPrefixException>(
         () => content.GetFilenameWithoutPrefix("AAADEF"));
 }
 public void LoadContentWithPrefixSet()
 {
     var content = new JewelBlocksContent { Prefix = "Mod1_" };
     var material = new Material(Shader.Position2DColorUV, "DeltaEngineLogo");
     new Sprite(material, new Rectangle(0.3f, 0.45f, 0.1f, 0.1f));
     content.Prefix = "Mod2_";
     material = new Material(Shader.Position2DColorUV, "DeltaEngineLogo");
     new Sprite(material, new Rectangle(0.6f, 0.45f, 0.1f, 0.1f));
 }
Beispiel #17
0
 public void SetUp()
 {
     displayMode = ScreenSpace.Current.Viewport.Aspect >= 1.0f
                         ? Orientation.Landscape : Orientation.Portrait;
     mockResolver = new MockResolver();
     mockKeyboard = mockResolver.Resolve <MockKeyboard>();
     mockMouse    = mockResolver.Resolve <MockMouse>();
     mockTouch    = mockResolver.Resolve <MockTouch>();
     content      = new JewelBlocksContent();
     game         = new Game(Resolve <Window>());
 }
 public void ContentWithPrefixSet()
 {
     var content = new JewelBlocksContent { Prefix = "Mod1_" };
     var image = content.Load<Image>("DeltaEngineLogo");
     Assert.IsTrue(image.PixelSize == new Size(4) || image.PixelSize == new Size(64) ||
         image.PixelSize == new Size(128));
     content.Prefix = "Mod2_";
     image = content.Load<Image>("DeltaEngineLogo");
     Assert.IsTrue(image.PixelSize == new Size(4) || image.PixelSize == new Size(256) ||
         image.PixelSize == new Size(128));
 }
Beispiel #19
0
		public void SetUp()
		{
			displayMode = ScreenSpace.Current.Viewport.Aspect >= 1.0f
				? Orientation.Landscape : Orientation.Portrait;
			mockResolver = new MockResolver();
			mockKeyboard = mockResolver.Resolve<MockKeyboard>();
			mockMouse = mockResolver.Resolve<MockMouse>();
			mockTouch = mockResolver.Resolve<MockTouch>();
			content = new JewelBlocksContent();
			game = new Game(Resolve<Window>());
		}
		public void ContentWithPrefixSet()
		{
			var content = new JewelBlocksContent { Prefix = "FruitBlocks_" };
			var image = content.Load<Image>("Block1");
			Assert.IsTrue(image.PixelSize == new Size(4) || image.PixelSize == new Size(64) ||
				image.PixelSize == new Size(128));
			content.Prefix = "JewelBlocks_";
			image = content.Load<Image>("Block1");
			Assert.IsTrue(image.PixelSize == new Size(4) || image.PixelSize == new Size(64) ||
				image.PixelSize == new Size(128));
		}
        public void LoadContentWithPrefixSet()
        {
            var content = new JewelBlocksContent {
                Prefix = "Mod1_"
            };
            var material = new Material(ShaderFlags.Position2DColoredTextured, "DeltaEngineLogo");

            new Sprite(material, new Rectangle(0.3f, 0.45f, 0.1f, 0.1f));
            content.Prefix = "Mod2_";
            material       = new Material(ShaderFlags.Position2DColoredTextured, "DeltaEngineLogo");
            new Sprite(material, new Rectangle(0.6f, 0.45f, 0.1f, 0.1f));
        }
        public void GetFilenameWithoutPrefix()
        {
            var content = new JewelBlocksContent {
                Prefix = "ABC"
            };

            Assert.AreEqual("DEF", content.GetFilenameWithoutPrefix("ABCDEF"));
            Assert.Throws <BlocksContent.FilenameWrongPrefixException>(
                () => content.GetFilenameWithoutPrefix("ADEF"));
            Assert.Throws <BlocksContent.FilenameWrongPrefixException>(
                () => content.GetFilenameWithoutPrefix("AAADEF"));
        }
        public void ContentWithPrefixSet()
        {
            var content = new JewelBlocksContent {
                Prefix = "FruitBlocks_"
            };
            var image = content.Load <Image>("Block1");

            Assert.IsTrue(image.PixelSize == new Size(4) || image.PixelSize == new Size(64) ||
                          image.PixelSize == new Size(128));
            content.Prefix = "JewelBlocks_";
            image          = content.Load <Image>("Block1");
            Assert.IsTrue(image.PixelSize == new Size(4) || image.PixelSize == new Size(64) ||
                          image.PixelSize == new Size(128));
        }
Beispiel #24
0
 public void SetUp()
 {
     displayMode = ScreenSpace.Current.Viewport.Aspect >= 1.0f
                         ? Orientation.Landscape : Orientation.Portrait;
     content = new JewelBlocksContent();
 }
Beispiel #25
0
 private void InitializeBlocks(Controller controller, JewelBlocksContent content)
 {
     controller.UpcomingBlock = new Block(displayMode, content, Vector2D.Zero);
     controller.FallingBlock  = new Block(displayMode, content, new Vector2D(6, 1));
 }
 public void SetUp()
 {
     content       = new JewelBlocksContent();
     userInterface = new UserInterface(content);
 }
Beispiel #27
0
		public void SetUp()
		{
			displayMode = ScreenSpace.Current.Viewport.Aspect >= 1.0f
				? Orientation.Landscape : Orientation.Portrait;
			content = new JewelBlocksContent();
		}
		public void SetUp()
		{
			content = new JewelBlocksContent();
			userInterface = new UserInterface(content);
		}
Beispiel #29
0
 public void SetUp()
 {
     displayMode = ScreenSpace.Current.Viewport.Aspect >= 1.0f
         ? Orientation.Landscape : Orientation.Portrait;
     content = new JewelBlocksContent();
     var image = content.Load<Image>("Block1");
     var shader = ContentLoader.Load<Shader>(Shader.Position2DColorUV);
     material = new Material(shader, image, image.PixelSize);
 }
Beispiel #30
0
 private void InitializeBlocks(Controller controller, JewelBlocksContent content)
 {
     controller.UpcomingBlock = new Block(displayMode, content, Vector2D.Zero);
     controller.FallingBlock = new Block(displayMode, content, new Vector2D(6, 1));
 }