Skip to content

Commit

Permalink
this should address issue #1
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcel Schepaniak committed Apr 11, 2018
1 parent 62ba6c3 commit eb1a052
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/main/java/iteratec/guiclient/traze/TrazeGUIClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,16 @@ public void render(GameContainer container, Graphics g) throws SlickException {
g.drawString("Time alive: " + (int) TrazeClient.time / 1000 + " sec", 10, 30);
for (int x = 0; x < TrazeClient.grid.getWidth(); x++) {
for (int y = 0; y < TrazeClient.grid.getHeight(); y++) {
for (Point c : TrazeClient.grid.getSpawns()) {
if (c.getX() == x && c.getY() == y) {
g.setColor(new Color(255, 255, 255, 0.85f));
g.fill(new Rectangle(x * GRID_GRAPHIC_WIDTH, WINDOW_HEIGHT - (y + Y_OFFSET) * GRID_GRAPHIC_HEIGHT, GRID_GRAPHIC_WIDTH, GRID_GRAPHIC_HEIGHT));
if(TrazeClient.grid.getSpawns() != null) {
for (Point c : TrazeClient.grid.getSpawns()) {
if (c.getX() == x && c.getY() == y) {
g.setColor(new Color(255, 255, 255, 0.85f));
g.fill(new Rectangle(x * GRID_GRAPHIC_WIDTH, WINDOW_HEIGHT - (y + Y_OFFSET) * GRID_GRAPHIC_HEIGHT, GRID_GRAPHIC_WIDTH, GRID_GRAPHIC_HEIGHT));
}
}
g.setColor(GRID_COLOR);
g.draw(new Rectangle(x * GRID_GRAPHIC_WIDTH, WINDOW_HEIGHT - (y + Y_OFFSET) * GRID_GRAPHIC_HEIGHT, GRID_GRAPHIC_WIDTH, GRID_GRAPHIC_HEIGHT));
}
g.setColor(GRID_COLOR);
g.draw(new Rectangle(x * GRID_GRAPHIC_WIDTH, WINDOW_HEIGHT - (y + Y_OFFSET) * GRID_GRAPHIC_HEIGHT, GRID_GRAPHIC_WIDTH, GRID_GRAPHIC_HEIGHT));
}
}
}
Expand Down

0 comments on commit eb1a052

Please sign in to comment.