Conversation
yurii-litvinov
left a comment
There was a problem hiding this comment.
А ещё по условию требовалось логирование основных событий. А так игра отличная, только код надо привести в порядок.
|
|
||
| class InvalidLabirintException extends Exception {} | ||
|
|
||
| public class Labirint { |
There was a problem hiding this comment.
Как обычно, нужны ещё комментарии
| List<Drawable> listDraw = new ArrayList<>(); | ||
| List<WithCoordsAndSpeed> listCoord = new ArrayList<>(); | ||
| List<ZombeeBot> listZomb = new ArrayList<>(); | ||
| List<SourceOfLife> listSrc = new ArrayList<>(); |
There was a problem hiding this comment.
И поля с пакетной видимостью --- это не очень
| } catch (InterruptedException e) { | ||
| } | ||
|
|
||
| //System.out.println("Updating labirint"); |
There was a problem hiding this comment.
Всякую отладочную печать надо убрать, закомментированный код надо уничтожать без жалости
| private List<Drawable> ld; | ||
| private int width, height; | ||
|
|
||
| public Labirint lb; |
There was a problem hiding this comment.
Паблик-полей вообще быть не должно
| @Override | ||
| public Dimension getPreferredSize() { | ||
| // TODO Auto-generated method stub | ||
| return new Dimension(width*RogueStarter.boxW, height*RogueStarter.boxH); |
There was a problem hiding this comment.
А бинарные операторы выделяются пробелами
|
|
||
| private static Labirint labirint; | ||
|
|
||
| public static void main( String[] args ) throws IOException, InvalidLabirintException |
There was a problem hiding this comment.
Тут с отступами что-то не так. Табуляции и пробелы смешаны
| } | ||
| } | ||
|
|
||
| class Brick extends WithCoordsAndSpeed implements Drawable { |
There was a problem hiding this comment.
В Java принято по одному классу на файл
| */ | ||
| public void testApp() | ||
| { | ||
| assertTrue( true ); |
There was a problem hiding this comment.
Ну как-то да... Надо хоть один нормальный юнит-тест
|
|
||
| enum Weapon {Shield, Knife}; | ||
|
|
||
| Weapon weapon = Weapon.Shield; |
There was a problem hiding this comment.
Поля с пакетной видимостью --- не очень
| @@ -0,0 +1,122 @@ | |||
| package roguelike; | |||
There was a problem hiding this comment.
Имена пакетов, кстати, неканоничныЪ
Описание управления в Readme