I've been trying to make a tile engine for AAAGES, and I've got further than ever before! Well, I've been able to get the window up without any errors. But still no tiles. At one point there was one red one in the top left corner, but after a bit of tweaking that disappeared.

But, I've had an idea in my head for a while now for a small and simple-ish top-down puzzle game using the Slick2d library. In the game, you're trying to break out of a jail cell, but walls block your exit. These walls are attached to pressure plates, and you have to stand on them to make the walls move. I've included a basic idea below (Paint ftw):



At the minute I've got 2 sorts of tiles, one black and one green. The window just shows empty blackness. I'll put my code below.

Java Code:
package george.game.cells;

import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.StateBasedGame;

public class GameMain extends StateBasedGame{
	public static final String gamename = "Prison Is Your Friend.";
	public static int WIDTH = 600;
	public static final int SCALE = 2;
	
	public GameMain(String gamename){
		super(gamename);
		this.addState(new World(World.currentLevel));
	}
	public void initStatesList(GameContainer gc) throws SlickException{
		this.getState(World.currentLevel);
		this.enterState(0);
	}
	public static void main(String[] args) throws SlickException {
		AppGameContainer appgc;
		try{
			appgc = new AppGameContainer(new GameMain(gamename));
			appgc.setDisplayMode(WIDTH, 600, false);
			appgc.start();
		}catch(SlickException e){
			e.printStackTrace();
		}
	}
}
Java Code:
package george.game.cells;

import org.newdawn.slick.Graphics;
import org.newdawn.slick.Image;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.geom.Rectangle;

public class Tiles{
	
	public static final int GREEN = 0, RED = 1;
	public static final float IMG_WIDTH = 60 * GameMain.SCALE, IMG_HEIGHT = 60 * GameMain.SCALE;
	protected int x, y;
	protected Rectangle tileRect;
	static Image tileImg;
	

	public Tiles(final int id, int x, int y) throws SlickException{
		switch(id){
		case GREEN:
			tileImg = new Image("res/cunt.png");
			
		case RED:
			tileImg = new Image("res/twat.png");
		}
		tileRect = new Rectangle(x, y, IMG_WIDTH, IMG_HEIGHT);
	}
	public void draw(Graphics g) {
		g.drawImage(Tiles.tileImg, Level.thex, Level.they);
		
	}
}
Java Code:
package george.game.cells;

import org.newdawn.slick.Graphics;
import org.newdawn.slick.SlickException;

public class Level {
	private int[] map;
	private Tiles[] tiles;
	private int x, y;
	private int mapSize;
	public static float thex, they;
	public static final float IMG_WIDTH = 60 * GameMain.SCALE, IMG_HEIGHT = 60 * GameMain.SCALE;

	public Level(int[] map){
		this.map = map;
		mapSize = map.length;
		tiles = new Tiles[mapSize];
	}

	public void loadMap() throws SlickException{
		x = 0;
		y = 0;
		for(int i = 0; i < mapSize; i++){
			tiles[i] = new Tiles(map[i], x, y);
			x += (IMG_WIDTH);

			if(x >= GameMain.WIDTH){
				x = 0;
				y -= (IMG_HEIGHT);
			}
		}
		thex = x;
		they = y;
	}
	public void draw(Graphics g) throws SlickException{
		loadMap();
		for(int i = 0; i < mapSize; i++){
			tiles[i].draw(g);
		}
	}
	public Tiles[] getTiles(){
		return tiles;
	}
}
Java Code:
package george.game.cells;

public class Map {
	public static int[] level1 = {1,1,1,1,1,1,1,1,1,1,
								  1,0,0,0,0,0,0,0,0,1,
								  1,0,0,0,0,0,0,0,0,1,
								  1,0,0,0,0,0,0,0,0,1,
								  1,0,0,0,0,0,0,0,0,1,
								  1,0,0,0,0,0,0,0,0,1,
								  1,0,0,0,0,0,0,0,0,1,
								  1,0,0,0,0,0,0,0,0,1,
								  1,0,0,0,0,0,0,0,0,1,
								  1,1,1,1,1,1,1,1,1,1};
	
	public static int[] level2 = {1,0,1,0,1,0,1,0,1,0,
								  0,1,0,1,0,1,0,1,0,1,
								  1,0,1,0,1,0,1,0,1,0,
								  0,1,0,1,0,1,0,1,0,1,
								  1,0,1,0,1,0,1,0,1,0,
								  0,1,0,1,0,1,0,1,0,1,
								  1,0,1,0,1,0,1,0,1,0,
								  0,1,0,1,0,1,0,1,0,1,
								  1,0,1,0,1,0,1,0,1,0,
								  0,1,0,1,0,1,0,1,0,1,};
}
Java Code:
package george.game.cells;


import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.BasicGameState;
import org.newdawn.slick.state.StateBasedGame;

public class World extends BasicGameState{
	private Level[] levels = new Level[2];
	public static int currentLevel;
	
	public void init(GameContainer gc, StateBasedGame sbg) throws SlickException{
		
	}
	public World(int currentLevel2){
		currentLevel = 0;
		levels[0] = new Level(Map.level1);
		levels[1] = new Level(Map.level2);
	}
	public void update(GameContainer gc, StateBasedGame sbg, int delta) throws SlickException{
		
	}
	public void render(GameContainer gc, StateBasedGame sbg, Graphics g) throws SlickException{ 
		levels[currentLevel].draw(g);
	}
	@Override
	public int getID() {
		// TODO Auto-generated method stub
		return 0;
	}
	
}
Any ideas on how to fix it are welcome, thankyou!