For no apparent reason, the following code "stops" after printing out Will be drawing.
private void drawMaps() {
System.out.println("Will be drawing...");
bs = display.getCanvas().getBufferStrategy();
if(bs == null){
display.getCanvas().createBufferStrategy(3);
return;
}
g = bs.getDrawGraphics();
//Clear Screens
g.clearRect(0, 0, 1000, 725);
//Draw Here!
System.out.println("Should be drawing");
for(int i=0; i<toPlay.islands().size(); i++) {
System.out.println("We're at island " + i);
int x = 0, y = 0;
if(i==0) {
x=50;
y=10;
}
Color toDraw = toPlay.islands().get(0).getTeam().getColor().getColor();
g.setColor(toDraw);
g.fillRect(x, y, 50, 50);
}
//End Drawing!
bs.show();
g.dispose();
}
What I get in the console from this is Will be drawing
, then nothing and nothing on my JFrame. I don't know why this doesn't work because this has worked in a different class before.