예제 #1
0
파일: Game.cs 프로젝트: whztt07/DeltaEngine
		protected Game(Logic logic)
		{
			this.logic = logic;
			buttonShader =
				ContentLoader.Create<Shader>(new ShaderCreationData(ShaderFlags.Position2DColoredTextured));
			buttonImage = new Theme().Button.DiffuseMap;
			buttons = new InteractiveButton[logic.Board.Width, logic.Board.Height];
			ArrangeScene();
			ScreenSpace.Current.ViewportSizeChanged += ArrangeScene;
		}
예제 #2
0
		public void CreateFromBoardData()
		{
			logic = new TwoHumanLogic(BoardTests.CreateBoardData());
			logic.MakeMove(Color.Red);
			Assert.AreEqual(Color.Red, logic.Board.GetColor(0, 0));
			Assert.AreEqual(1, logic.ActivePlayer);
			Assert.AreEqual(2, logic.GetPlayerScore(0));
		}
예제 #3
0
		public HumanVsAiLogicTests(Logic logic)
		{
			this.logic = logic;
			colorFinder = new AvailableColorFinder(logic.Board, new[] { PlayerHomeSquare, AiHomeSquare });
		}