Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using CryptoMiningSystem.Utilities;
- using System;
- namespace CryptoMiningSystem.Entities.Components.VideoCards
- {
- public class MineVideoCard : VideoCard
- {
- private const int increseInManeMoneyPerHour = 8;
- private const int increseInLifeWorkingHours = 2;
- public MineVideoCard(string model, int generation,int ram, decimal price)
- : base(model, price, generation, ram)
- {
- this.Generation = generation;
- this.MinedMoneyPerHour = increseInManeMoneyPerHour;
- this.LifeWorkingHours = increseInLifeWorkingHours;
- }
- public override int Generation
- {
- get => base.Generation;
- set
- {
- if (value > 9)
- {
- throw new ArgumentException("Game video card generation cannot be more than 9!");
- }
- base.Generation = value;
- }
- }
- public override decimal MinedMoneyPerHour
- {
- get => base.MinedMoneyPerHour;
- set => base.MinedMoneyPerHour = base.MinedMoneyPerHour * value;
- }
- public override int LifeWorkingHours
- {
- get => base.LifeWorkingHours;
- set => base.LifeWorkingHours = base.LifeWorkingHours * value;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement