Skip to content

Commit

Permalink
Replaced switch expression with ternary conditional operator
Browse files Browse the repository at this point in the history
  • Loading branch information
ze-dom committed Oct 14, 2024
1 parent 8ce2d49 commit ca6b912
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/GameLogic/DefaultDropGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,7 @@ public class DefaultDropGenerator : IDropGenerator
public DefaultDropGenerator(GameConfiguration config, IRandomizer randomizer)
{
this._randomizer = randomizer;
this._maxItemOptionLevelDrop = config.MaximumItemOptionLevelDrop switch
{
< 1 or > 4 => 3,
_ => config.MaximumItemOptionLevelDrop,
};
this._maxItemOptionLevelDrop = config.MaximumItemOptionLevelDrop < 1 || config.MaximumItemOptionLevelDrop > 4 ? (byte)3 : config.MaximumItemOptionLevelDrop;
this._droppableItems = config.Items.Where(i => i.DropsFromMonsters).ToList();
this._ancientItems = this._droppableItems.Where(
i => i.PossibleItemSetGroups.Any(
Expand Down

0 comments on commit ca6b912

Please sign in to comment.