public PlayerAI(AI gameAI) { this.GameAI = gameAI; Rectangle runRoom = new Rectangle(new Point(1, 1), new Size(GameAI.FieldCell.GetLength(0) - 3, GameAI.FieldCell.GetLength(1) - 3)); LeftSideRunRoom = runRoom; RightSideRunRoom = runRoom; DistanceToEnemy = 3; }
public GameEventHandler(Game game) { currentGame = game; gameAI = currentGame.GameAI; currentGame.CurrentAction = game.CurrentAction; lastPlayersInOffside = new List<Player>(); columns = currentGame.FieldCell.GetLength(0); rows = currentGame.FieldCell.GetLength(1); }
/* Saves AllPlayers and FieldCell. */ public static void SetData(AI gameAI, Player[] allPlayers, Rectangle[,] fieldCell) { AllPlayers = allPlayers; FieldCell = fieldCell; GameAI = gameAI; }