package data;

import tiles.Tile;
import tiles.TileGrid;
import org.lwjgl.opengl.Display;
import org.newdawn.slick.opengl.Texture;

import Players.DungeonPlayer;
import helpers.Render;

public class boot {
	public boot() {
		Render.beginSession();

		int[][] map = {
				{2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
				{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
		};
		TileGrid grid = new TileGrid(map);
		DungeonPlayer player = new DungeonPlayer(Render.QuickLoad("dirt"), grid.getTile(1, 1),64,64,100,2,new int[0]);
		while (!Display.isCloseRequested()) { //Tick function. Everything happens here
			grid.Draw();
			player.Update();
			player.Render();
			Display.update();
			Display.sync(GlobalSettings.fps);
			//TODO: Make a way of modifying tiles that are in the sheet.
		}
		Display.destroy();
	}
	public static void main(String[] args) {
			new boot();
	}
}