Exemplo n.º 1
0
        public BlockLinerState GetStateInstance(BlockLinerState.Type stateType)
        {
            // TODO: may be refactored to an array of BlockLinerState and search the good one
            switch (stateType)
            {
            case BlockLinerState.Type.Init: return(_initState);

            case BlockLinerState.Type.NewBlock: return(_newBlockState);

            case BlockLinerState.Type.Falling: return(_fallingState);

            case BlockLinerState.Type.Checking: return(_checkingState);

            case BlockLinerState.Type.GameOver: return(_gameoverState);
            }
            throw new ArgumentException("BlockLinerState is not supported");
        }
Exemplo n.º 2
0
 public BlockLinerState GetStateInstance(BlockLinerState.Type stateType)
 {
     return(_state);
 }