-
Notifications
You must be signed in to change notification settings - Fork 23
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
F1H43C - EEJYN9 Torpedó konzolos játék #34
base: main
Are you sure you want to change the base?
Conversation
Added ship placing logic
Implemented game logic and added gameplay
Added Statistics
Preferences
Added unit tests
Implemented tests for the preferences and Changed some file names
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.
Szép munka
private IPlayer HumanPlayer; | ||
private IPlayer AIPlayer; | ||
|
||
public static GameManager Instance |
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.
Hmmm... Singleton...
if (string.IsNullOrWhiteSpace(username)) | ||
throw new ArgumentException("Username cannot be empty", nameof(username)); | ||
|
||
ValidateAndApplyDefaults(preferences); |
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.
Validáció 👍
} | ||
|
||
public void ValidateAndApplyDefaults(GamePreferences preferences) | ||
{ |
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.
Mivel ez JSON akár egy JSON Schema alapú validációval is megoldható lenne. Egyetlen baj, hogy a .NET beépített megoldást még nem tartalmaz JSON Schema olvasására.
- A kiszámolt statisztikákat elmentjük és megjelenítjük a konzolon | ||
|
||
|
||
### Játék indítása |
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.
Dokumentáció 👍
Torpedó konzolos játék
Issue