public void Constructor()
 {
     var content = new JewelBlocksContent(new TestResolver());
     Assert.AreEqual("JewelBlocks_", content.Prefix);
     Assert.IsTrue(content.AreFiveBrickBlocksAllowed);
     Assert.IsFalse(content.DoBricksSplitInHalfWhenRowFull);
 }
Esempio n. 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");
		}
Esempio n. 3
0
 public void AreFiveBrickBlocksAllowed()
 {
     var content = new JewelBlocksContent();
     Assert.IsTrue(content.AreFiveBrickBlocksAllowed);
     content.AreFiveBrickBlocksAllowed = false;
     Assert.IsFalse(content.AreFiveBrickBlocksAllowed);
 }
Esempio n. 4
0
 public void DoBlocksStartInARandomColumn()
 {
     var content = new JewelBlocksContent();
     Assert.IsFalse(content.DoBlocksStartInARandomColumn);
     content.DoBlocksStartInARandomColumn = true;
     Assert.IsTrue(content.DoBlocksStartInARandomColumn);
 }
Esempio n. 5
0
 public void DoBricksSplitInHalfOnExit()
 {
     var content = new JewelBlocksContent();
     Assert.IsFalse(content.DoBricksSplitInHalfWhenRowFull);
     content.DoBricksSplitInHalfWhenRowFull = true;
     Assert.IsTrue(content.DoBricksSplitInHalfWhenRowFull);
 }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 11
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>();
 }
Esempio n. 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());
		}
Esempio n. 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());
 }
Esempio n. 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>();
		}
Esempio n. 15
0
 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"));
 }
Esempio n. 16
0
 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));
 }
Esempio n. 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>());
 }
Esempio n. 18
0
 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));
 }
Esempio n. 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>());
		}
Esempio n. 20
0
		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));
        }
Esempio n. 24
0
 public void SetUp()
 {
     displayMode = ScreenSpace.Current.Viewport.Aspect >= 1.0f
                         ? Orientation.Landscape : Orientation.Portrait;
     content = new JewelBlocksContent();
 }
Esempio n. 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);
 }
Esempio n. 27
0
		public void SetUp()
		{
			displayMode = ScreenSpace.Current.Viewport.Aspect >= 1.0f
				? Orientation.Landscape : Orientation.Portrait;
			content = new JewelBlocksContent();
		}
Esempio n. 28
0
		public void SetUp()
		{
			content = new JewelBlocksContent();
			userInterface = new UserInterface(content);
		}
Esempio n. 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);
 }
Esempio n. 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));
 }