-
Notifications
You must be signed in to change notification settings - Fork 0
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
Game #11
base: main
Are you sure you want to change the base?
Game #11
Conversation
…tion of cursor depends of variable, which value sets manually
@@ -0,0 +1,29 @@ | |||
namespace ConsoleWrapper; | |||
|
|||
public class ConsoleWrapper : IConsoleWrapper |
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 void WriteLine(string data) | ||
{ | ||
Console.WriteLine(data); | ||
} |
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 void WriteLine(string data) | |
{ | |
Console.WriteLine(data); | |
} | |
public void WriteLine(string data) | |
=> Console.WriteLine(data); |
Делегация же.
@@ -0,0 +1,9 @@ | |||
<Project Sdk="Microsoft.NET.Sdk"> |
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.
И это не должно быть отдельным проектом :)
Game/Game/EventLoop.cs
Outdated
/// <summary> | ||
/// Starts the event loop | ||
/// </summary> | ||
/// <exception cref="ArgumentOutOfRangeException"></exception> |
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 event-ам нужны, а пустые тэги — нет
Position = (Position.Item1, Position.Item2 + 1); | ||
console.SetCursorPosition(Position.Item1, Position.Item2); | ||
WriteAtSign(); | ||
} |
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.
Копипаст. Можно реализовать логику один раз, просто передавать ей разное изменение позиции
using Game; | ||
using IConsoleWrapper = ConsoleWrapper.IConsoleWrapper; | ||
|
||
IConsoleWrapper console = new ConsoleWrapper.ConsoleWrapper(); |
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.
IConsoleWrapper console = new ConsoleWrapper.ConsoleWrapper(); | |
var console = new ConsoleWrapper.ConsoleWrapper(); |
Вам тут не важно, что это именно интерфейс, он при вызове Game.Game(console) сам скастается
No description provided.