private bool ProcessEvent(Event e) { MPATile t = _chains.Values.Select(c => c[e.Nid]).FirstOrDefault(c => c != null); var success = t?.ProcessEvent(e) ?? false; return(success); }
private bool ProcessChainInit(ChainInit i) { MPAChain nc = new MPAChain(i.ChainID, this); foreach (var bi in i.BoardInfos) { MPATile t = new MPATile(bi.Bid, bi.Pid, bi.Nid, nc); nc.AddTile(t); } _chains[i.ChainID] = nc; ChainAdded?.Invoke(this, new MPAChainEventArgs(nc)); return(true); }