forked from plutoscarab/Rails
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Engines.cs
60 lines (47 loc) · 1.15 KB
/
Engines.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
58
59
60
// Engines.cs
/*
* Some global data describing locomotive types.
*
*/
using System;
namespace Rails
{
public sealed class Engine
{
public const int UpgradeCost = 20; // costs 20 to upgrade train
public const int UpgradeTime = 180; // takes three hours to upgrade train
public const int MaxEngineType = 3; // fastest engine
private static string[] description =
{"Steam", "Electric", "Diesel", "Maglev"};
private static TimeSpan[] speed =
{
new TimeSpan(2, 40, 0), // steam
new TimeSpan(2, 0, 0), // electric
new TimeSpan(1, 36, 0), // diesel
new TimeSpan(1, 20, 0), // maglev
};
private static string[] speedString =
{"2h 40m", "2h 00m", "1h 36m", "1h 20m"};
private static int[] speedInMinutes =
{160, 120, 96, 80};
private Engine()
{
}
public static string[] Description
{
get { return description; }
}
public static TimeSpan[] Speed
{
get { return speed; }
}
public static string[] SpeedString
{
get { return speedString; }
}
public static int[] SpeedInMinutes
{
get { return speedInMinutes; }
}
}
}