Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lofcz committed Nov 26, 2019
1 parent 834846d commit 39b3653
Show file tree
Hide file tree
Showing 11 changed files with 448 additions and 85 deletions.
16 changes: 16 additions & 0 deletions src/main/java/com/company/BaseLevel.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
public class BaseLevel {
private int state;
private boolean playerHere;
private String name;
private String entranceText;

public int getState() {
return state;
Expand Down Expand Up @@ -58,6 +60,20 @@ public Image getLevelImage() {
return levelImage;
}

public String getName() {return name;}

public void setName(String name) {
this.name = name;
}

public void setEntranceText(String entranceText) {
this.entranceText = entranceText;
}

public String getEntranceText() {
return entranceText;
}

/**
* Returns whether an item is present in the inventory
*
Expand Down
104 changes: 54 additions & 50 deletions src/main/java/com/company/Colors.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,73 +91,77 @@ public static boolean GetColorsEnabled() {

public static Color Xterm255ToColor(int color) {

if (color < 16) {
if (color == 0) {
return Color.rgb(0, 0, 0);
}

if (color == 1) {
return Color.rgb(128, 0, 0);
}
if (color == 0) {
return Color.rgb(0, 0, 0);
}

if (color == 2) {
return Color.rgb(0, 128, 0);
}
if (color == 1) {
return Color.rgb(128, 0, 0);
}

if (color == 3) {
return Color.rgb(128, 128, 0);
}
if (color == 2) {
return Color.rgb(0, 128, 0);
}

if (color == 4) {
return Color.rgb(0, 0, 128);
}
if (color == 3) {
return Color.rgb(128, 128, 0);
}

if (color == 5) {
return Color.rgb(128, 0, 128);
}
if (color == 4) {
return Color.rgb(0, 0, 128);
}

if (color == 6) {
return Color.rgb(0, 128, 128);
}
if (color == 5) {
return Color.rgb(128, 0, 128);
}

if (color == 7) {
return Color.rgb(192, 192, 192);
}
if (color == 6) {
return Color.rgb(0, 128, 128);
}

if (color == 8) {
return Color.rgb(128, 128, 128);
}
if (color == 7) {
return Color.rgb(192, 192, 192);
}

if (color == 9) {
return Color.rgb(255, 0, 0);
}
if (color == 8) {
return Color.rgb(128, 128, 128);
}

if (color == 10) {
return Color.rgb(0, 255, 0);
}
if (color == 9 || color == 196) {
return Color.rgb(255, 0, 0);
}

if (color == 11) {
return Color.rgb(255, 255, 0);
}
if (color == 10) {
return Color.rgb(0, 255, 0);
}

if (color == 12) {
return Color.rgb(0, 0, 255);
}
if (color == 11) {
return Color.rgb(255, 255, 0);
}

if (color == 13) {
return Color.rgb(255, 0, 255);
}
if (color == 12) {
return Color.rgb(0, 0, 255);
}

if (color == 14) {
return Color.rgb(0, 255, 255);
}
if (color == 13) {
return Color.rgb(255, 0, 255);
}

if (color == 15) {
return Color.rgb(255, 255, 255);
}
if (color == 14) {
return Color.rgb(0, 255, 255);
}

return Color.rgb( ((color - 16) / 36) * 51, ((color - 16) / 36) * 51, ((color - 16) / 6) * 51);
if (color == 15) {
return Color.rgb(255, 255, 255);
}

if (color == 118) {
return Color.rgb(135, 255, 0);
}


return Color.rgb( 0, 0, 0);
}
}

Loading

0 comments on commit 39b3653

Please sign in to comment.