Skip to content

Commit 601fc02

Browse files
authored
Update WarController.cs
1 parent 3115de0 commit 601fc02

File tree

1 file changed

+10
-10
lines changed
  • OOP Preparation Exams/OOP Retake Exam - 19 December 2020/Warcroft/Core

1 file changed

+10
-10
lines changed

OOP Preparation Exams/OOP Retake Exam - 19 December 2020/Warcroft/Core/WarController.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ public class WarController
1313
private List<Character> heroes;
1414
private List<Item> items;
1515

16-
public WarController()
16+
public WarController()
1717
{
1818
heroes = new List<Character>();
1919
items = new List<Item>();
2020
}
2121

22-
public string JoinParty(string[] args)
22+
public string JoinParty(string[] args)
2323
{
2424
string charType = args[0];
2525
string heroName = args[1];
@@ -42,7 +42,7 @@ public string JoinParty(string[] args)
4242
return string.Format(SuccessMessages.JoinParty, heroName);
4343
}
4444

45-
public string AddItemToPool(string[] args)
45+
public string AddItemToPool(string[] args)
4646
{
4747
string itemName = args[0];
4848
Item item;
@@ -64,7 +64,7 @@ public string AddItemToPool(string[] args)
6464
return string.Format(SuccessMessages.AddItemToPool, itemName);
6565
}
6666

67-
public string PickUpItem(string[] args)
67+
public string PickUpItem(string[] args)
6868
{
6969
string heroName = args[0];
7070
Item targetItem = items.LastOrDefault();
@@ -86,7 +86,7 @@ public string PickUpItem(string[] args)
8686
}
8787

8888
public string UseItem(string[] args)
89-
{
89+
{
9090
string heroName = args[0];
9191
string itemName = args[1];
9292
var targetHero = heroes.FirstOrDefault(x => x.Name == heroName);
@@ -102,7 +102,7 @@ public string UseItem(string[] args)
102102
}
103103

104104
public string GetStats()
105-
{
105+
{
106106
StringBuilder sb = new StringBuilder();
107107
var ordered = heroes
108108
.OrderByDescending(x => x.IsAlive)
@@ -120,7 +120,7 @@ public string GetStats()
120120
return sb.ToString().TrimEnd();
121121
}
122122

123-
public string Attack(string[] args)
123+
public string Attack(string[] args)
124124
{
125125
//POSSIBLE ERRORS
126126
string attackerName = args[0];
@@ -161,7 +161,7 @@ public string Attack(string[] args)
161161
}
162162

163163
public string Heal(string[] args)
164-
{
164+
{
165165
//POSSIBLE ERRORS
166166
string healerName = args[0];
167167
string receiverName = args[1];
@@ -189,5 +189,5 @@ public string Heal(string[] args)
189189
targetHealer.Name, targetReceiver.Name, targetHealer.AbilityPoints,
190190
targetReceiver.Name, targetReceiver.Health);
191191
}
192-
}
193-
}
192+
}
193+
}

0 commit comments

Comments
 (0)