public Tool(String name, decimal age, Worth baseWorth) { Name = name; Age = age; BaseWorth = baseWorth; InitEvent(); }
public Tool(String name) { Name = name; Age = 0; BaseWorth = new Worth(0, 0); InitEvent(); }
private void CalculateCurrentWorth() { if (Age != 0) { decimal tmp = _currentWorth.Price; _currentWorth.Price = _baseWorth.Price * _baseWorth.SentimentalValue * Age / 2; if (_currentWorth.Price > tmp && tmp != 0) { ToolWorthIncreasedEvent(tmp, _currentWorth.Price); } _currentWorth.SentimentalValue = _baseWorth.SentimentalValue; } else { _currentWorth = BaseWorth; } }