Open
Conversation
…оты, информации "О себе" и аватара.
Public методы тпеперь package-private.
Новый конструктор Squad
Отсутствует проверка вводимых значений полей.
Отсутствует проверка вводимых значений полей.
Отсутствует проверка вводимых значений полей.
…class Переопределение внутренней реализации Squad.class Реализация проверок полей ввода Анимация
src/BattleSim/DateHelper.java
Outdated
|
|
||
|
|
||
| { | ||
| calendar.add(Calendar.YEAR, -1500); |
src/BattleSim/DateHelper.java
Outdated
| private Date battleTime; | ||
| private Date battleBeginTime; | ||
| private Calendar calendar = Calendar.getInstance(); | ||
| private DateFormat dfFull = new SimpleDateFormat("HH:mm, dd MMMM YYY"); |
Collaborator
There was a problem hiding this comment.
строку в константы
src/BattleSim/DateHelper.java
Outdated
| 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"); |
src/BattleSim/DateHelper.java
Outdated
| } | ||
|
|
||
| void skipTime() { | ||
| calendar.add(Calendar.MINUTE, 45); |
src/BattleSim/DateHelper.java
Outdated
| } | ||
|
|
||
| String getFormattedStartDate() { | ||
| //возвращает отформатированную |
Collaborator
There was a problem hiding this comment.
прочитай как писать документацию в джаве) оформи комментарии правильно)
Owner
Author
There was a problem hiding this comment.
javadoc - понял-принял
| shakeField(firstSquadSizeField); | ||
| firstSquadSizeField.requestFocus(); | ||
| state1 = false; | ||
| } else state1 = true; |
| boolean state4; | ||
| try { | ||
| if (checkIntField(secondSquadSizeField)) { | ||
| if (Integer.parseInt(secondSquadSizeField.getText()) <= 0 & extraSquad2.toString() == "empty") { |
Collaborator
There was a problem hiding this comment.
у тебя тут пздц какая высокая вложенность ифов. Читать сложно код
| shakeField(secondSquadSizeField); | ||
| secondSquadSizeField.requestFocus(); | ||
| state2 = false; | ||
| } else state2 = true; |
Owner
Author
There was a problem hiding this comment.
Оукей, просто ИДЕя сама предлагает убрать
| firstSquadnameField.requestFocus(); | ||
| state3 = false; | ||
| } | ||
| return (state1 && state2 && state3 && state4); |
Collaborator
There was a problem hiding this comment.
разбей этот метод на кучку методов чтоли...
Owner
Author
There was a problem hiding this comment.
Отпочковал от метода один вложеный.
| } | ||
|
|
||
| void shakeField(Node node) { | ||
| Shake shakeNode = new Shake(node, 50, 5f); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.