[go: up one dir, main page]

Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Externius committed Oct 18, 2017
1 parent f7c6aae commit 2da0822
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion app/src/main/java/externius/rdmg/core/DungeonNoCorridor.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
public class DungeonNoCorridor extends Dungeon {
private List<DungeonTile> openDoorList = new ArrayList<>();
private List<DungeonTile> edgeTileList = new ArrayList<>();
private final List<DungeonTile> roomStart = new ArrayList<>();
private List<DungeonTile> roomStart = new ArrayList<>();

public DungeonNoCorridor(int dungeonWidth, int dungeonHeight, int dungeonSize, int roomSizePercent) {
this.dungeonWidth = dungeonWidth;
Expand Down Expand Up @@ -51,6 +51,7 @@ public void generate() {
}

public void addFirstRoom() {
roomStart = new ArrayList<>();
openDoorList = new ArrayList<>();
int x = Utils.getRandomInt(5, dungeonTiles.length - (roomSize + 4));
int y = Utils.getRandomInt(5, dungeonTiles.length - (roomSize + 4));
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/externius/rdmg/helpers/Export.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ public static String generateHTML(Bitmap bmp, List<RoomDescription> roomDescript
stringBuilder.append("<html>\n" +
"<head>\n" +
"<title>DungeonMap</title>\n" +
"<style>table, th, td {border-collapse: collapse;} th, td {padding: 8px; text-align: left; border-bottom: 1px solid #ddd; width: 100%;}td.room{ width: unset;}</style>\n" +
"<style>table, th, td {border-collapse: collapse;} th, td {padding: 8px; text-align: left; border-bottom: 1px solid #ddd;} .wrap {white-space: pre-wrap;}</style>\n" +
"</head>\n" +
"<body>\n" +
"<img src=\"data:image/png;base64,");
stringBuilder.append(bitmapToBase64String(bmp));
stringBuilder.append("\">\n" +
"<table id=\"table_description\">");
"<table id=\"table_description\" class=\"wrap\">");
for (int i = 0; i < roomDescription.size(); i++) {
stringBuilder.append("<tr>\n" +
"<td rowspan=\"3\" class=\"room\">");
"<td rowspan=\"3\">");
stringBuilder.append(roomDescription.get(i).getName());
stringBuilder.append("</td>\n" +
"<td>");
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/externius/rdmg/helpers/Trap.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ private static int getTrapDanger() {
}
}

static String getCurrentTrap(boolean Door) {
static String getCurrentTrap(boolean door) {
int trapDanger = getTrapDanger(); // setback, dangerous, deadly
if (Door) { // get random currentTrap index
if (door) { // get random currentTrap index
currentTrap = trapDoorKind[Utils.getRandomInt(0, trapDoorKind.length)];
} else {
currentTrap = trapKind[Utils.getRandomInt(0, trapKind.length)];
Expand Down

0 comments on commit 2da0822

Please sign in to comment.