Skip to content

Roguelike#7

Open
pvktk wants to merge 7 commits intomasterfrom
rogueCheck
Open

Roguelike#7
pvktk wants to merge 7 commits intomasterfrom
rogueCheck

Conversation

@pvktk
Copy link
Copy Markdown
Owner

@pvktk pvktk commented Jun 2, 2018

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

Copy link
Copy Markdown

@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 {
Copy link
Copy Markdown

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

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

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;
Copy link
Copy Markdown

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

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
Copy link
Copy Markdown

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

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

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown

@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;
Copy link
Copy Markdown

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;
Copy link
Copy Markdown

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