public GameAI(AIGameClient game, Duel duel) { Game = game; Connection = game.Connection; Duel = duel; Utils = new AIFunctions(duel); _dialogs = new Dialogs(game); }
public GameBehavior(AIGameClient game) { Game = game; Connection = game.Connection; _packets = new Dictionary<StocMessage, Action<GameServerPacket>>(); _messages = new Dictionary<GameMessage, Action<GameServerPacket>>(); RegisterPackets(); _room = new Room(); _duel = new Duel(); _ai = new GameAI(Game, _duel); _ai.Executor = DecksManager.Instantiate(_ai, _duel); Deck = Deck.Load(_ai.Executor.Deck); }
public GameBehavior(AIGameClient game) { Game = game; Connection = game.Connection; _packets = new Dictionary <StocMessage, Action <GameServerPacket> >(); _messages = new Dictionary <GameMessage, Action <GameServerPacket> >(); RegisterPackets(); _room = new Room(); _duel = new Duel(); _ai = new GameAI(Game, _duel); _ai.Executor = DecksManager.Instantiate(_ai, _duel); Deck = Deck.Load(_ai.Executor.Deck); }
private static void Run(String pass, String serverIP, int serverPort,int version,String room="", string cdb="cards.cdb") { ProVersion = version; if(pass=="--"){ pass=""; } if(room=="[null]"){ room=""; } Console.WriteLine(pass+" "+serverIP+":"+serverPort+" 0x"+version.ToString("x")+" room:"+room); Rand = new Random(); CardsManager.Init(cdb); DecksManager.Init(); // Start two clients and connect them to the same room. Which deck is gonna win? AIGameClient clientA = new AIGameClient(pass, serverIP, serverPort, room); clientA.Start(); while (clientA.Connection.IsConnected) { clientA.Tick(); Thread.Sleep(1); } //Thread.Sleep(3000); }