Removed spaces from top-level directory names.

Spaces tend to cause annoyances in a Unix-style shell environment.
This change fixes that.
This commit is contained in:
Chris Reuter
2021-11-21 18:30:21 -05:00
parent df2e7426eb
commit d26dbf036a
1725 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
using System;
namespace Game
{
/// <summary>
/// Represents the armed forces for a country.
/// </summary>
public record ArmedForces
{
/// <summary>
/// Gets the number of men and women in the army.
/// </summary>
public int Army { get; init; }
/// <summary>
/// Gets the number of men and women in the navy.
/// </summary>
public int Navy { get; init; }
/// <summary>
/// Gets the number of men and women in the air force.
/// </summary>
public int AirForce { get; init; }
/// <summary>
/// Gets the total number of troops in the armed forces.
/// </summary>
public int TotalTroops => Army + Navy + AirForce;
/// <summary>
/// Gets the number of men and women in the given branch.
/// </summary>
public int this[MilitaryBranch branch] =>
branch switch
{
MilitaryBranch.Army => Army,
MilitaryBranch.Navy => Navy,
MilitaryBranch.AirForce => AirForce,
_ => throw new ArgumentException("INVALID BRANCH")
};
}
}