mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-22 15:16:33 -08:00
Add command-line switch
This commit is contained in:
@@ -5,4 +5,6 @@ global using static Cube.Resources.Resource;
|
||||
|
||||
using Cube;
|
||||
|
||||
new Game(new ConsoleIO(), new RandomNumberGenerator()).Play();
|
||||
IRandom random = args.Contains("--non-random") ? new ZerosGenerator() : new RandomNumberGenerator();
|
||||
|
||||
new Game(new ConsoleIO(), random).Play();
|
||||
|
||||
Reference in New Issue
Block a user