예제 #1
0
        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);
        }
예제 #2
0
        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);
        }