Skip to content

Conversation

@RamSaw
Copy link
Owner

@RamSaw RamSaw commented May 4, 2018

No description provided.


private void setUpField(int n) {
GameController gameController = new GameController(n);
field = new GridPane();
Copy link
Collaborator

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 {
Copy link
Collaborator

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() {
Copy link
Collaborator

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);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не нужно в тестах никакого UI создавать, особенно в модульных

@jzuken
Copy link
Collaborator

jzuken commented May 23, 2018

7 баллов

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants