package com.fundynamic.d2tm;

import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.BasicGame;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.SlickException;

/**
 * A game using Slick2d
 */
public class Game extends BasicGame {

    /** Screen width */
    private static final int WIDTH = 800;
    /** Screen height */
    private static final int HEIGHT = 600;
    
    /** A counter... */
    private int counter;

    public Game() {
        super("A Slick2d game");
    }

    public void render(GameContainer container, Graphics g) throws SlickException {
        g.drawString("Hello, " + Integer.toString(counter) + "!", 50, 50);

    }

    @Override
    public void init(GameContainer container) throws SlickException {
        counter = 0;
    }

    @Override
    public void update(GameContainer container, int delta) throws SlickException {
        counter++;
    }
    
    public static void main(String[] args) throws SlickException {
        AppGameContainer app = new AppGameContainer(new Game());
        app.setDisplayMode(WIDTH, HEIGHT, false);
        app.setForceExit(false);
        app.start();
    }

}

@@ -223,39 +223,8 @@
 n;%0A%0A
-/**%0A * A game using Slick2d%0A */
 %0Apub
@@ -263,32 +263,8 @@
  %7B%0A%0A
-    /** Screen width */%0A
     
@@ -288,16 +288,23 @@
 nal int 
+SCREEN_
 WIDTH = 
@@ -312,33 +312,8 @@
 00;%0A
-    /** Screen height */%0A
     
@@ -337,16 +337,23 @@
 nal int 
+SCREEN_
 HEIGHT =
@@ -367,58 +367,8 @@
    %0A
-    /** A counter... */%0A    private int counter;%0A%0A
     
@@ -402,22 +402,27 @@
 er(%22
-A Slick2d game
+Dune II - The Maker
 %22);%0A
@@ -540,55 +540,63 @@
 (%22He
-llo, %22 + Integer.toString(
+ who controls the spice... 
 co
-u
 nt
-er) + %22
+rols the universe
 !%22, 
-5
 0, 
-5
 0);%0A
@@ -691,29 +691,8 @@
 n %7B%0A
-        counter = 0;%0A
     
@@ -795,27 +795,8 @@
 n %7B%0A
-        counter++;%0A
     
@@ -965,15 +965,29 @@
 ode(
-WIDTH, 
+SCREEN_WIDTH, SCREEN_
 HEIG
@@ -1023,20 +1023,19 @@
 rceExit(
-fals
+tru
 e);%0A    

refactor a bit and make sure vm quits when game quits