示例#1
0
文件: AI.cs 项目: mvdlaar/AIRally
 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;
     }
 }
示例#2
0
 public AIRally(string boardLocation)
 {
     Board = new Board(this, boardLocation);
     programDeck = new ProgramDeck();
     AIs = new AIList();
 }
示例#3
0
文件: AI.cs 项目: mvdlaar/AIRally
 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++;
     }
 }