Created
March 6, 2017 17:52
-
-
Save charlieamat/14d49fecc725d9c46ba08c7624dd2402 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Player | |
{ | |
private const double MaxPowerups = 2; | |
private Weapon _weapon; | |
public List<IPowerup> Powerups { get; } = new List<IPowerup>(); | |
public double Damage => _weapon.Damage * Powerups.Take(MaxPowerups).Sum(p => p.Multiplier); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment