public AI(int number, Board board, string name, string location) { Number = number; Name = name; this.location = location; this.board = board; ProgramCards = new List<ProgramCard>(); Direction = TileDirection.Left; Registers = new Registers(); Type AIType = LoadAI(); if (AIType != null) { PlugInAI = (IAI)Activator.CreateInstance(AIType); Loaded = true; } }
public AIRally(string boardLocation) { Board = new Board(this, boardLocation); programDeck = new ProgramDeck(); AIs = new AIList(); }
internal void AskAction(Board board) { var cardOrder = PlugInAI.PlayCards(board.ToString(), GetProgramCards()); var i = 0; while (i < 5 && i < cardOrder.Length) { Registers[i] = ProgramCards[cardOrder[i]]; i++; } }