-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
сайт #87
base: Mihail_Soldatov
Are you sure you want to change the base?
сайт #87
Conversation
{ | ||
public interface Abilities | ||
{ | ||
void Ability(Player player); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Зачем?
public int Strong { get; } = rnd.Next(1, 99); | ||
public Abilities UsingAbility { get; set; } | ||
|
||
public List<Abilities> UseAbility = new List<Abilities>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔕 Но не плохо было бы его инкапсулировать
public List<string> Effects = new List<string>(); | ||
public void Ability() | ||
{ | ||
if (!Effects.Contains("Freezing")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Точно имена должны быть в виде enum'ов
|
||
Console.WriteLine(" "); | ||
Console.WriteLine("Team1"); | ||
for (int i = 0; i < numberOfPlayers / 2; i++) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Вынести выбор в отдельный метод
{ | ||
Random rnd = new Random(); | ||
int a = rnd.Next(0, 3); | ||
if (a == 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
switch - case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create enum wit classes
|
||
Console.WriteLine(" "); | ||
|
||
for (int i = 0; i < numberOfPlayers / 2; i++) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
отдельный метод
Console.WriteLine("{0} have {1}, his strong: {2}", player.Enemy, player.Enemy.HP, player.Enemy.Strong); | ||
while (player.HP > 0 && player.Enemy.HP > 0) | ||
{ | ||
Console.WriteLine(" "); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logger
var arr1 = new[] { 0, 1 }; | ||
var rndMember = arr1[b.Next(arr1.Length)]; | ||
|
||
// int cooldown=0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔪
{ | ||
if ((rndMember != 0) && (cooldownTeam1 != 3)) | ||
{ | ||
if (player.ToString() == "RPG.Knight") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
No description provided.