Skip to content

Java fx homework 7#9

Open
MaximShatrov wants to merge 36 commits intomasterfrom
JavaFX_Homework_7
Open

Java fx homework 7#9
MaximShatrov wants to merge 36 commits intomasterfrom
JavaFX_Homework_7

Conversation

@MaximShatrov
Copy link
Copy Markdown
Owner

No description provided.

MaximShatrov and others added 30 commits April 15, 2020 20:44
Новый конструктор Squad
Отсутствует проверка вводимых значений полей.
Отсутствует проверка вводимых значений полей.
Отсутствует проверка вводимых значений полей.
…class

Переопределение внутренней реализации Squad.class
Реализация проверок полей ввода
Анимация


{
calendar.add(Calendar.YEAR, -1500);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

константы

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

ок

private Date battleTime;
private Date battleBeginTime;
private Calendar calendar = Calendar.getInstance();
private DateFormat dfFull = new SimpleDateFormat("HH:mm, dd MMMM YYY");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

строку в константы

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

ok

private Date battleBeginTime;
private Calendar calendar = Calendar.getInstance();
private DateFormat dfFull = new SimpleDateFormat("HH:mm, dd MMMM YYY");
private DateFormat dfTimeOnly = new SimpleDateFormat("HH:mm");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

в константы

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

ok

}

void skipTime() {
calendar.add(Calendar.MINUTE, 45);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

в константы

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

oook

}

String getFormattedStartDate() {
//возвращает отформатированную
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

прочитай как писать документацию в джаве) оформи комментарии правильно)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

javadoc - понял-принял

shakeField(firstSquadSizeField);
firstSquadSizeField.requestFocus();
state1 = false;
} else state1 = true;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

{} верни

boolean state4;
try {
if (checkIntField(secondSquadSizeField)) {
if (Integer.parseInt(secondSquadSizeField.getText()) <= 0 & extraSquad2.toString() == "empty") {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

у тебя тут пздц какая высокая вложенность ифов. Читать сложно код

shakeField(secondSquadSizeField);
secondSquadSizeField.requestFocus();
state2 = false;
} else state2 = true;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

{} верни

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Оукей, просто ИДЕя сама предлагает убрать

firstSquadnameField.requestFocus();
state3 = false;
}
return (state1 && state2 && state3 && state4);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

разбей этот метод на кучку методов чтоли...

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Отпочковал от метода один вложеный.

}

void shakeField(Node node) {
Shake shakeNode = new Shake(node, 50, 5f);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

константы

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

ок

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.

2 participants