public BasePrediction Add(PredictionType type, int depth, Point point, List <Command> commands = null, BaseItem item = null) { var prediction = PredictionFactory.Get(type, depth, point, commands, item); switch (type) { case PredictionType.AiMove: AiMovePredictions.Add((AiMovePrediction)prediction); break; case PredictionType.AiShot: AiShotPredictions.Add((AiShotPrediction)prediction); break; case PredictionType.Bullet: BulletPredictions.Add((BulletPrediction)prediction); break; case PredictionType.EnemyMove: EnemyMovePredictions.Add((EnemyMovePrediction)prediction); break; case PredictionType.EnemyShot: EnemyShotPredictions.Add((EnemyShotPrediction)prediction); break; case PredictionType.MyMove: MyMovePredictions.Add((MyMovePrediction)prediction); break; case PredictionType.MyShot: MyShotPredictions.Add((MyShotPrediction)prediction); break; case PredictionType.MyKill: MyKillPredictions.Add((MyKillPrediction)prediction); break; case PredictionType.DangerCell: DangerCellPredictions.Add((DangerCellPrediction)prediction); break; default: throw new NotImplementedException(); } return(prediction); }