Skip to content

Conversation

@pvktk
Copy link
Owner

@pvktk pvktk commented Jun 2, 2018

Описание управления в Readme

Copy link

@yurii-litvinov yurii-litvinov left a comment

Choose a reason for hiding this comment

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

А ещё по условию требовалось логирование основных событий. А так игра отличная, только код надо привести в порядок.


class InvalidLabirintException extends Exception {}

public class Labirint {

Choose a reason for hiding this comment

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

Как обычно, нужны ещё комментарии

List<Drawable> listDraw = new ArrayList<>();
List<WithCoordsAndSpeed> listCoord = new ArrayList<>();
List<ZombeeBot> listZomb = new ArrayList<>();
List<SourceOfLife> listSrc = new ArrayList<>();

Choose a reason for hiding this comment

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

И поля с пакетной видимостью --- это не очень

} catch (InterruptedException e) {
}

//System.out.println("Updating labirint");

Choose a reason for hiding this comment

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

Всякую отладочную печать надо убрать, закомментированный код надо уничтожать без жалости

private List<Drawable> ld;
private int width, height;

public Labirint lb;

Choose a reason for hiding this comment

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

Паблик-полей вообще быть не должно

@Override
public Dimension getPreferredSize() {
// TODO Auto-generated method stub
return new Dimension(width*RogueStarter.boxW, height*RogueStarter.boxH);

Choose a reason for hiding this comment

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

А бинарные операторы выделяются пробелами


private static Labirint labirint;

public static void main( String[] args ) throws IOException, InvalidLabirintException

Choose a reason for hiding this comment

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

Тут с отступами что-то не так. Табуляции и пробелы смешаны

}
}

class Brick extends WithCoordsAndSpeed implements Drawable {

Choose a reason for hiding this comment

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

В Java принято по одному классу на файл

*/
public void testApp()
{
assertTrue( true );

Choose a reason for hiding this comment

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

Ну как-то да... Надо хоть один нормальный юнит-тест

Copy link

@yurii-litvinov yurii-litvinov left a comment

Choose a reason for hiding this comment

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

Хорошо, зачтена


enum Weapon {Shield, Knife};

Weapon weapon = Weapon.Shield;

Choose a reason for hiding this comment

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

Поля с пакетной видимостью --- не очень

@@ -0,0 +1,122 @@
package roguelike;

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.

3 participants