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,52 @@
using System;
using System.Collections.Immutable;
using System.Linq;
namespace Game
{
class Program
{
/// <summary>
/// Defines the set of companies that will be simulated in the game.
/// </summary>
private readonly static ImmutableArray<Company> Companies = ImmutableArray.CreateRange(new[]
{
new Company("INT. BALLISTIC MISSILES", "IBM", sharePrice:100),
new Company("RED CROSS OF AMERICA", "RCA", sharePrice:85 ),
new Company("LICHTENSTEIN, BUMRAP & JOKE", "LBJ", sharePrice:150),
new Company("AMERICAN BANKRUPT CO.", "ABC", sharePrice:140),
new Company("CENSURED BOOKS STORE", "CBS", sharePrice:110)
});
static void Main()
{
var assets = new Assets
{
Cash = 10000.0,
Portfolio = ImmutableArray.CreateRange(Enumerable.Repeat(0, Companies.Length))
};
var previousDay = default(TradingDay);
Controller.StartGame();
foreach (var day in StockMarket.Simulate(Companies))
{
if (previousDay is null)
View.ShowCompanies(day.Companies);
else
View.ShowTradeResults(day, previousDay, assets);
View.ShowAssets(assets, day.Companies);
if (previousDay is not null && !Controller.GetYesOrNo(View.PromptContinue))
break;
assets = Controller.UpdateAssets(assets, day.Companies);
previousDay = day;
}
View.ShowFarewell();
}
}
}