@Override
    public void render(GameContainer container, StateBasedGame game, Graphics g) throws SlickException {
        g.setColor(Color.darkGray);
        g.fillRect(0, 0, 800, 600);
        for (int i = 0; i < board.width; i++) {
            for (int j = 0; j < board.height; j++) {
                Building b = board.buildings[i][j];
                g.setColor(Color.gray);
                g.fillRect(100 + (i + 0.05f) * 100, (j + 0.05f) * 100, 90, 90);
                if (b == null) {
                } else if (b.isRubble == false) {
                    Image im;
                    if (b.owner == board.player1) {
                        if (b.isCapital) {
                            im = player1CapitalImage;
                        } else {
                            im = player1BuildingImage;
                        }
                    } else {
                        if (b.isCapital) {
                            im = player2CapitalImage;
                        } else {
                            im = player2BuildingImage;
                        }
                    }
                    im.draw(100 + (i + 0.1f) * 100, (j + 0.1f) * 100);
                    if (!board.isConnectedToCapital(i, j, b.owner)) {
                        disabledOverlayImage.draw(100 + (i + 0.1f) * 100, (j + 0.1f) * 100);
                    }

                    g.setColor(Color.black);
                    g.drawString(Integer.toString(b.height), 100 + (i + .5f) * 100 - 5, (j + .5f) * 100 - 10);
                } else {
                    Date currentDate = new Date();
                    if (currentDate.getTime() > b.rubbleStart + RUBBLE_TIME) {
                        board.buildings[i][j] = null;
                    } else {
                        Image im;
                        if (b.owner == board.player1) {
                            im = player1RubbleImage;
                        } else {
                            im = player2RubbleImage;
                        }
                        im.draw(100 + (i + 0.1f) * 100, (j + 0.1f) * 100);
                    }
                }
            }
        }
        renderPlayer(container, game, g, board.player1, Color.red, 50);
        renderPlayer(container, game, g, board.player2, Color.blue, container.getWidth() - 50);
        switch (board.state) {
        case PAUSED:
            g.setColor(Color.white);
            String msg = "PAUSED" + "\n" + "Press SPACE to unpause";
            g.drawString(msg, (container.getWidth() - g.getFont().getWidth(msg)) / 2, container.getHeight() / 2);
            break;
        case DONE:
            g.setColor(Color.white);
            Player winner = board.player1.hasCapital ? board.player1 : board.player2;
            msg = winner.name + " WINS!" + "\n" + "Press SPACE to play again" + "\n"
                    + "Press ESC or BACKSPACE for main manu";
            g.drawString(msg, (container.getWidth() - g.getFont().getWidth(msg)) / 2, container.getHeight() / 2);
            break;
        }
    }