internal OnlineHostResolver(IBoard board, string outip, int outport, int inport) { this.outip = outip; this.inport = inport; this.outport = outport; HostToken = TokenHelper.NewToken(); tokens = new List <string>(); Board = board; Judges.onAttach(); //Create local proxy local = new LocalProxy(RelayMessage); local.Token = HostToken; tokens.Add(HostToken); //Create remote proxy JoinToken = TokenHelper.NewToken(); var connector = new Connector(JoinToken); remote = new RemoteProxy(connector); remote.Token = JoinToken; tokens.Add(remote.Token); remote.EnableIn(System.Net.IPAddress.Any, inport); Judges.AttachProxy(local); Judges.AttachProxy(remote); Board.LatticClick += onLatticClick; }
public override void Ready() { Judges.Enable(); foreach (var token in tokens) { Pass(token, ActionType.Join, null); } }
public virtual void OnBasicJudge(string token, JudgeCode code) { if (code == JudgeCode.Joined) { int boxId = Judges.GetBoxId(token); if (token == HostToken) { hostBoxId = boxId; } else if (token == JoinToken) { joinBoxId = boxId; } } }
internal PVPResolver(IBoard board) { Board = board; Judges.onAttach(); HostToken = TokenHelper.NewToken(); JoinToken = TokenHelper.NewToken(); tokens = new List <string>() { HostToken, JoinToken }; shareProxy = new LocalProxy(RelayMessage); shareProxy.Token = HostToken; Judges.AttachProxy(shareProxy); board.LatticClick += onLatticClick; }
internal EVPResolver(IBoard board, AILevel level) { Board = board; Judges.onAttach(); //Attach proxy JoinToken = TokenHelper.NewToken(); HostToken = TokenHelper.NewToken(); shareProxy = new LocalProxy(RelayMessage); shareProxy.Token = TokenHelper.NewToken(); Judges.AttachProxy(shareProxy); //Subscribe event board.LatticClick += onLatticClick; //Generate token and store it. tokens = new List <string>(2); tokens.Add(JoinToken); tokens.Add(HostToken); setDeep(level); }
public override void Ready() { Judges.Enable(); remote.EnableOut(outip, outport); }
public virtual void Reset() { Judges.Reset(); }
public CoreResolverBase() { Judges = new Judges(); resolverCommon = new ResolverCommon(this); }