-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSpeedSystem.cs
More file actions
63 lines (48 loc) · 1.51 KB
/
Copy pathSpeedSystem.cs
File metadata and controls
63 lines (48 loc) · 1.51 KB
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
61
62
63
using System;
using System.Collections.Generic;
using System.Linq;
namespace SpeedSystem
{
class Program
{
static void Main(string[] args)
{
//player + enemy1 + enemy2
public string player = "Player";
public string enemy1 = "Enemy1";
public string enemy2 = "Enemy2";
//global var
int baseWait = 100; //subject to change later on
//player variables
int playerSpeed = 12; //base speed may change
int playerWait = baseWait - PlayerSpeed;
//enemy1 variables
int enemy1Speed = 20;
int enemy1Wait = baseWait - enemy1Speed;
//enemy 2 variables
int enemy2Speed = 5;
int enemy2Wait = baseWait - enemy1Speed;
//list of wait times
var characters = new List<(string Name, int Wait)>
{
(player, playerWait),
(enemy1, enemy1Wait),
(enemy2, enemy2Wait)
};
//wait time lowest wait first
var sortedCharacters = characters.OrderBy(c => c.Wait).ToList();
//print order
Console.WriteLine("advancement:");
foreach (var characters in sortedCharacters)
{
Console.WriteLine($"{character.Name} with wait time {character.Wait}");
}
//print order 1-100
Console.WriteLine("\nTurn Orders from Turn 1 to Turn 100:");
for (int turn = 1; turn <= 100; turn++)
{
Console.WriteLine($"Turn{turn}");
}
}
}
}