// Use this for initialization void Start() { size = 10; abstractGamePlan = new GamePlan(size, numberOfCharacters); actualGameState = gameStates.makingTurnWaiting; highlightedPlanes = new List <PlaneSquareScript> (); plane = new GameObject[size, size]; for (int i = 0; i < size; i++) { for (int j = 0; j < size; j++) { plane [i, j] = UnityEngine.Object.Instantiate(PlaneSquarePrefab, new Vector3(10 * i, 0, 10 * j), Quaternion.identity) as GameObject; var script = plane [i, j].GetComponent <PlaneSquareScript> (); script.position.x = i; script.position.y = j; script.GM = this; script.SquareToSelectChild.GetComponent <SquareToSelect> ().GM = this; } } createCharacterAtPos(0, 1, new Fighter(0, 1, true)); createCharacterAtPos(0, 5, new Fighter(0, 5, true)); createCharacterAtPos(0, 8, new Fighter(0, 8, true)); createCharacterAtPos(9, 1, new Fighter(9, 1, false)); createCharacterAtPos(9, 8, new Fighter(9, 8, false)); createCharacterAtPos(9, 5, new Fighter(9, 5, false)); turnPlaner = new TurnPlaner(abstractGamePlan.alliedCharacters); }
public OrderFight(GamePlan plan, Inventory inventory, Health health, Game game) { Name = "bojuj"; this.random = new Random(); this.inventory = inventory; this.health = health; this.plan = plan; this.game = game; }
public void Form1Test() { GamePlan gamePlan = new GamePlan(); if (gamePlan.show() == 0) { Assert.IsTrue(true); } }
public void Form2Test() { GamePlan gamePlan = new GamePlan(); gamePlan.genNo(); if (gamePlan.show() > 0) { Assert.IsTrue(true); } }
public void Test_AdvancedAi_GamePlan_Resources() { GamePlan gamePlan = new GamePlan(Rules.Build(new[] { 2, 2 }).AddSingleRowRules(1, 2).Players(2).LastMoveWins().Create()); gamePlan.Generate(); gamePlan = new GamePlan(Rules.Build(new[] { 1, 2, 3, 4, 5 }).AddSingleRowRules(1, 3).Players(2).LastMoveWins().Create()); gamePlan.Generate(); gamePlan = new GamePlan(Rules.Build(new[] { 2, 2, 8, 5, 10, 4 }).AddSingleRowRules(1, 5).Players(4).LastMoveWins().Create()); gamePlan.Generate(); }
public OrderGrab(Inventory inventory, GamePlan plan) { Name = "seber"; this.inventory = inventory; this.plan = plan; }
public OrderMove(GamePlan plan, Health health) { Name = "jdi"; this.plan = plan; this.health = health; }