-
Notifications
You must be signed in to change notification settings - Fork 0
Realized task with tests and javadocs. #22
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
base: master
Are you sure you want to change the base?
Conversation
|
|
||
| private void setUpField(int n) { | ||
| GameController gameController = new GameController(n); | ||
| field = new GridPane(); |
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.
лейауты бы тут совсем не помешали, окно зумится довольно некрасиво
| /** | ||
| * Class that controls game flow and creates buttons for user interaction. | ||
| */ | ||
| public class GameController { |
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.
этот класс бы стоило разбить, явно выделив работу с UI и работу с логикой игры. тогда и тесты можно было бы нормально писать
| /** | ||
| * Initializes buttons: set ups on click listeners. | ||
| */ | ||
| private void initButtons() { |
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 static void initJFX() { | ||
| Thread t = new Thread("JavaFX Init Thread") { | ||
| public void run() { | ||
| Application.launch(AsNonApp.class); |
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.
не нужно в тестах никакого UI создавать, особенно в модульных
|
7 баллов |
No description provided.