Example #1
0
        private IEnumerable <BasePrediction> GetPredictionsByType(PredictionType type)
        {
            switch (type)
            {
            case PredictionType.DangerCell:
                return(DangerCellPredictions.Select(x => (BasePrediction)x));

            case PredictionType.MyKill:
                return(MyKillPredictions.Select(x => (BasePrediction)x));

            case PredictionType.MyShot:
                return(MyShotPredictions.Select(x => (BasePrediction)x));

            case PredictionType.MyMove:
                return(MyMovePredictions.Select(x => (BasePrediction)x));

            case PredictionType.AiShot:
                return(AiShotPredictions.Select(x => (BasePrediction)x));

            case PredictionType.Bullet:
                return(BulletPredictions.Select(x => (BasePrediction)x));

            case PredictionType.AiMove:
                return(AiMovePredictions.Select(x => (BasePrediction)x));

            case PredictionType.EnemyShot:
                return(EnemyShotPredictions.Select(x => (BasePrediction)x));

            case PredictionType.EnemyMove:
                return(EnemyMovePredictions.Select(x => (BasePrediction)x));

            default:
                throw new ArgumentOutOfRangeException(nameof(type), type, null);
            }
        }