-
Notifications
You must be signed in to change notification settings - Fork 1
/
Wizard.cs
57 lines (53 loc) · 2.26 KB
/
Wizard.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
using System;
namespace Slimulator {
public class Wizard {
public static Simulation Setup() {
PrintLogo();
Console.Write("Path of input file: ");
String input = Console.ReadLine();
String output = $@"/home/john/Projects/Slimulator/export/SlimulatorVideo-{DateTime.Now:HH-mm-ss}.mp4";
Console.Write($"Path of input file (default: {output}): ");
String customOutput = Console.ReadLine();
if (!string.IsNullOrEmpty(customOutput)) output = customOutput;
Console.Write($@"[0] Default - Uses default values
[1] SlowMotion - Very slow but detailed output
[2] Fast - Very fast video ideal for large mazes
[3] QuickTest - Short video ideal for parameter tweaking
[4] Benchmark - Outputs 30 frame video with 1000 ticks per frame
Choice (default 0): ");
String choiceOfSettings = Console.ReadLine().Trim();
int cos = 0;
if (!String.IsNullOrEmpty(choiceOfSettings)) cos = int.Parse(choiceOfSettings);
SimulationSettings ss = SimulationSettings.Default();
switch (cos) {
case 0:
break;
case 1:
ss = SimulationSettings.SlowMotion();
break;
case 2: ss = SimulationSettings.Fast();
break;
case 3: ss = SimulationSettings.QuickTest();
break;
case 4: ss = SimulationSettings.Benchmark();
break;
default:
Console.WriteLine("Invalid settings");
Environment.Exit(1);
break;
}
Console.WriteLine(input);
return new Simulation(input, output, ss);
}
private static void PrintLogo() {
Console.Write(@"
_____ _ _ _ _
/ ____| (_) | | | |
| (___ | |_ _ __ ___ _ _| | __ _| |_ ___ _ __
\___ \| | | '_ ` _ \| | | | |/ _` | __/ _ \| '__|
____) | | | | | | | | |_| | | (_| | || (_) | |
|_____/|_|_|_| |_| |_|\__,_|_|\__,_|\__\___/|_|
");
}
}
}