示例#1
0
        // constructor
        public BoardGameMode()
        {
            _startEvent = new StartEvent();
            _shuffleEvent = new ShuffleEvent();
            _drawEvent = new DrawEvent();
            _endEvent = new EndEvent();

            _bingoEvent = new BingoEvent();
            _attackEvent = new AttackEvent();
            _counterAttackEvent = new CounterAttackEvent();
            _removeAllDefenseEvent = new RemoveAllDefenseEvent();
            _turnChangeEvent = new TurnChangeEvent();
            _criterionChangeEvent = new CriterionChangeEvent();
            _flowChangeEvent = new FlowChangeEvent();
            _cellOwnerChangeEvent = new CellOwnerChangeEvent();
            _cellBingoChangeEvent = new CellBingoChangeEvent();

            _board = new Board();
        }
示例#2
0
        IEnumerator processBoard(byte num, Player player)
        {
            _board.SetCellOwner(num, player.Owner);
            yield return null;

            int count = _board.GetBingoCount(player.Owner);
            if (count <= 0)
                yield break;

            BingoEvent.Invoke();
            yield return null;

            player.Bingo(count);
            yield return null;

            if (EUserGameState.Unknown != isOver())
                yield break;
            
            _board.InitBingo();

            switchCriterion();
            yield return null;
        }