-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Balance changes, and add KnownIssues and PlannedChanges tabs
- Loading branch information
1 parent
4c6b143
commit e5d1dee
Showing
35 changed files
with
411 additions
and
274 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using System; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace BaldersGait.Models.State.BarberShop; | ||
|
||
[Serializable] | ||
public class BarberShopChair | ||
{ | ||
public ChairNumbers ChairNumber { get; set; } = ChairNumbers.Unknown; | ||
public bool Unlocked { get; set; } = false; | ||
public double HairLength { get; set; } = 0; | ||
|
||
[JsonIgnore] | ||
public double HairGrowthScalingFactor => Math.Round(ChairNumber switch | ||
{ | ||
ChairNumbers.One => 1, | ||
_ => (double)ChairNumber / Math.Pow(2, (int)ChairNumber) | ||
}, 3); | ||
|
||
[JsonIgnore] | ||
public bool ReadyToCollect => HairLength >= GetMaxHairLength(); | ||
|
||
public double GetHairGrowthWithScalingFactor(double baseHairGrowthPerTick) | ||
{ | ||
return Math.Round(baseHairGrowthPerTick * HairGrowthScalingFactor, 3); | ||
} | ||
|
||
public bool IsProductionTooHigh(double baseHairGrowthPerTick) | ||
{ | ||
return GetHairGrowthWithScalingFactor(baseHairGrowthPerTick) > GetMaxHairLength(); | ||
} | ||
|
||
public double GetMaxHairLength() | ||
{ | ||
// TODO: Add upgrades for this | ||
return 10; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
5 changes: 4 additions & 1 deletion
5
...ait/Models/State/BarberShop/SeatNumber.cs → ...t/Models/State/BarberShop/ChairNumbers.cs
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
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
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
32 changes: 12 additions & 20 deletions
32
BaldersGait/ViewModels/Panels/BarberShop/BarberShopBottomViewModel.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,21 @@ | ||
using Avalonia.Media; | ||
using BaldersGait.Models.State.BarberShop; | ||
using BaldersGait.Services.Interface; | ||
|
||
namespace BaldersGait.ViewModels.Panels.BarberShop; | ||
|
||
public class BarberShopBottomViewModel : ViewModelBase | ||
public class BarberShopBottomViewModel(IStateService stateService) : ViewModelBase | ||
{ | ||
public BarberShopChairViewModel SeatOne { get; init; } | ||
public BarberShopChairViewModel SeatTwo { get; init; } | ||
public BarberShopChairViewModel SeatThree { get; init; } | ||
public BarberShopChairViewModel SeatFour { get; init; } | ||
public BarberShopChairViewModel SeatFive { get; init; } | ||
public BarberShopChairViewModel SeatSix { get; init; } | ||
public BarberShopChairViewModel SeatSeven { get; init; } | ||
public BarberShopChairViewModel SeatEight { get; init; } | ||
public BarberShopBottomViewModel(IStateService stateService) | ||
public BarberShopChairViewModel SeatOne { get; init; } = new(stateService, ChairNumbers.One); | ||
public BarberShopChairViewModel SeatTwo { get; init; } = new(stateService, ChairNumbers.Two); | ||
public BarberShopChairViewModel SeatThree { get; init; } = new(stateService, ChairNumbers.Three); | ||
public BarberShopChairViewModel SeatFour { get; init; } = new(stateService, ChairNumbers.Four); | ||
public BarberShopChairViewModel SeatFive { get; init; } = new(stateService, ChairNumbers.Five); | ||
public BarberShopChairViewModel SeatSix { get; init; } = new(stateService, ChairNumbers.Six); | ||
public BarberShopChairViewModel SeatSeven { get; init; } = new(stateService, ChairNumbers.Seven); | ||
public BarberShopChairViewModel SeatEight { get; init; } = new(stateService, ChairNumbers.Eight); | ||
|
||
protected override void RefreshUIFromState() | ||
{ | ||
SeatOne = new(stateService, SeatNumber.One); | ||
SeatTwo = new(stateService, SeatNumber.Two); | ||
SeatThree = new(stateService, SeatNumber.Three); | ||
SeatFour = new(stateService, SeatNumber.Four); | ||
SeatFive = new(stateService, SeatNumber.Five); | ||
SeatSix = new(stateService, SeatNumber.Six); | ||
SeatSeven = new(stateService, SeatNumber.Seven); | ||
SeatEight = new(stateService, SeatNumber.Eight); | ||
// Nothing to do | ||
} | ||
} |
Oops, something went wrong.