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; }
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)); }
public HumanVsAiLogicTests(Logic logic) { this.logic = logic; colorFinder = new AvailableColorFinder(logic.Board, new[] { PlayerHomeSquare, AiHomeSquare }); }