Index: .gitignore
===================================================================
--- .gitignore	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
+++ .gitignore	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
@@ -0,0 +1,3 @@
+*.class
+LostHaven.jar
+err.txt
Index: xState.java
===================================================================
--- AuxState.java	(revision a5b4186ca52f455a110a593c9a58bf9ebeceb07c)
+++ 	(revision )
@@ -1,6 +1,0 @@
-
-public enum AuxState
-{
-	None,
-    MsgBox
-}
Index: eature.java
===================================================================
--- Creature.java	(revision a5b4186ca52f455a110a593c9a58bf9ebeceb07c)
+++ 	(revision )
@@ -1,218 +1,0 @@
-import java.awt.image.*;
-
-public class Creature {
-	private String name;
-	private CreatureType type;
-	private BufferedImage img;
-	private Gender gender;
-	private int level;
-	private Point loc;
-	private int speed;
-	private long lastMoved;
-	private int attackSpeed;
-	private int damage;
-	private long lastAttacked;
-	private int strength;
-	private int dexterity;
-	private int constitution;
-	private int charisma;
-	private int wisdom;
-	private int intelligence;
-	private int hitpoints;
-	private int manapoints;
-	private int maxHitpoints;
-	private int maxManapoints;
-	
-	public Creature() {
-		name = "";
-		gender = Gender.None;
-		loc = new Point(0, 0);
-	}
-
-	public Creature(String name) {
-		this.name = name;
-		loc = new Point(0, 0);
-	}
-	
-	public Creature(String name, Gender gender) {
-		this.name = name;
-		this.gender = gender;
-		loc = new Point(0, 0);
-	}
-	
-	public int getAttackSpeed() {
-		return attackSpeed;
-	}
-
-	public int getCharisma() {
-		return charisma;
-	}
-
-	public int getConstitution() {
-		return constitution;
-	}
-
-	public int getDamage() {
-		return damage;
-	}
-
-	public int getDexterity() {
-		return dexterity;
-	}
-
-	public Gender getGender() {
-		return gender;
-	}
-
-	public int getHitpoints() {
-		return hitpoints;
-	}
-	
-	public BufferedImage getImg() {
-		return img;
-	}
-
-	public int getIntelligence() {
-		return intelligence;
-	}
-
-	public long getLastAttacked() {
-		return lastAttacked;
-	}
-
-	public long getLastMoved() {
-		return lastMoved;
-	}
-
-	public int getLevel() {
-		return level;
-	}
-
-	public Point getLoc() {
-		return loc;
-	}
-
-	public int getManapoints() {
-		return manapoints;
-	}
-
-	public int getMaxHitpoints() {
-		return maxHitpoints;
-	}
-
-	public int getMaxManapoints() {
-		return maxManapoints;
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public int getSpeed() {
-		return speed;
-	}
-
-	public int getStrength() {
-		return strength;
-	}
-	
-	public CreatureType getType() {
-		return type;
-	}
-
-	public int getWisdom() {
-		return wisdom;
-	}
-
-	public void setAttackSpeed(int attackSpeed) {
-		this.attackSpeed = attackSpeed;
-	}
-
-	public void setCharisma(int charisma) {
-		this.charisma = charisma;
-	}
-
-	public void setConstitution(int constitution) {
-		this.constitution = constitution;
-	}
-
-	public void setDamage(int damage) {
-		this.damage = damage;
-	}
-
-	public void setDexterity(int dexterity) {
-		this.dexterity = dexterity;
-	}
-
-	public void setGender(Gender gender) {
-		this.gender = gender;
-	}
-
-	public void setHitpoints(int hitpoints) {
-		this.hitpoints = hitpoints;
-	}
-	
-	public void setImg(BufferedImage img) {
-		this.img = img;
-	}
- 
-	public void setIntelligence(int intelligence) {
-		this.intelligence = intelligence;
-	}
-
-	public void setLastAttacked(long lastAttacked) {
-		this.lastAttacked = lastAttacked;
-	}
-
-	public void setLastMoved(long lastMoved) {
-		this.lastMoved = lastMoved;
-	}
-
-	public void setLevel(int level) {
-		this.level = level;
-	}
-
-	public void setLoc(Point loc) {
-		this.loc = loc;
-	}
-
-	public void setManapoints(int manapoints) {
-		this.manapoints = manapoints;
-	}
-
-	public void setMaxHitpoints(int maxHitpoints) {
-		this.maxHitpoints = maxHitpoints;
-	}
-
-	public void setMaxManapoints(int maxManapoints) {
-		this.maxManapoints = maxManapoints;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public void setSpeed(int speed) {
-		this.speed = speed;
-	}
-
-	public void setStrength(int strength) {
-		this.strength = strength;
-	}
-	
-	public void setType(CreatureType type) {
-		this.type = type;
-	}
-
-	public void setWisdom(int wisdom) {
-		this.wisdom = wisdom;
-	}
-	
-	public String toString() {
-		return name;
-	}
-	
-	public boolean equals(Object c) {
-		return name.trim().equals(((Creature)c).name.trim());
-	}
-}
Index: eatureType.java
===================================================================
--- CreatureType.java	(revision a5b4186ca52f455a110a593c9a58bf9ebeceb07c)
+++ 	(revision )
@@ -1,4 +1,0 @@
-
-public enum CreatureType {
-
-}
Index: meState.java
===================================================================
--- GameState.java	(revision a5b4186ca52f455a110a593c9a58bf9ebeceb07c)
+++ 	(revision )
@@ -1,14 +1,0 @@
-
-public enum GameState
-{
-	Main,
-    CreateAccount,
-    CreateClass,
-    LoadGame,
-    Info,
-    Credits,
-    Game,
-    GameMenu,
-    GameInventory,
-    GameStats
-}
Index: nder.java
===================================================================
--- Gender.java	(revision a5b4186ca52f455a110a593c9a58bf9ebeceb07c)
+++ 	(revision )
@@ -1,6 +1,0 @@
-
-public enum Gender {
-	None,
-	Male,
-	Female
-}
Index: b.java
===================================================================
--- Job.java	(revision a5b4186ca52f455a110a593c9a58bf9ebeceb07c)
+++ 	(revision )
@@ -1,10 +1,0 @@
-
-public enum Job {
-	None,
-    Fighter,
-    Ranger,
-    Barbarian,
-    Sorceror,
-    Druid,
-    Wizard
-}
Index: nd.java
===================================================================
--- Land.java	(revision a5b4186ca52f455a110a593c9a58bf9ebeceb07c)
+++ 	(revision )
@@ -1,21 +1,0 @@
-import java.awt.image.*;
-
-public class Land extends MapElement {
-	private LandType type;
-	
-	public Land(LandType type, BufferedImage img, boolean passable) {
-		super(img, passable);
-
-		this.type = type;
-	}
-	
-	public Land(LandType type, String imgFile, boolean passable) {
-		super(imgFile, passable);
-		
-		this.type = type;
-	}
-	
-	public LandType getType() {
-		return type;
-	}
-}
Index: ndType.java
===================================================================
--- LandType.java	(revision a5b4186ca52f455a110a593c9a58bf9ebeceb07c)
+++ 	(revision )
@@ -1,5 +1,0 @@
-
-public enum LandType {
-	Grass,
-	Ocean
-}
Index: cation.java
===================================================================
--- Location.java	(revision a5b4186ca52f455a110a593c9a58bf9ebeceb07c)
+++ 	(revision )
@@ -1,37 +1,0 @@
-import java.util.*;
-
-public class Location {
-	private Land land;
-	private Structure structure;
-	private PriorityQueue<Creature> creatures;
-	
-	public Location(Land land, Structure structure) {
-		this.land = land;
-		this.structure = structure;
-		this.creatures = new PriorityQueue<Creature>();
-	}
-
-	public void addCreature(Creature creature) {
-		creatures.add(creature);
-	}
-	
-	public Land getLand() {
-		return land;
-	}
-
-	public Structure getStruct() {
-		return structure;
-	}
-	
-	public void setLand(Land type) {
-		land = type;
-	}
-	
-	public void setStruct(Structure type) {
-		structure = type;
-	}
-	
-	public boolean isPassable() {
-		return land.isPassable() && structure.isPassable();
-	}
-}
Index: stHavenRPG.java
===================================================================
--- LostHavenRPG.java	(revision a5b4186ca52f455a110a593c9a58bf9ebeceb07c)
+++ 	(revision )
@@ -1,606 +1,0 @@
-import java.awt.*;
-import java.awt.image.*;
-import java.awt.event.*;
-import java.io.*;
-import java.util.*;
-import javax.imageio.*;
-import java.text.*;
-
-import gamegui.*;
-
-/* 
- * This is the main class in the project. It initializes wide-screen mode and is responsible for drawing to the screen and handling
- * input.
- * 
- * The classes in the gamegui folder are similar to the Swing classes in that they help in building a gui. They are all extended from
- * the Member class and instances of each of them can be added to a Window class. They also have input-handling functionality.
- */
-
-public class LostHavenRPG implements KeyListener, MouseListener {
-	private static DisplayMode[] BEST_DISPLAY_MODES = new DisplayMode[] {
-        new DisplayMode(800, 600, 32, 0),
-        new DisplayMode(800, 600, 16, 0),
-        new DisplayMode(800, 600, 8, 0)
-    };
-	
-	boolean done;
-	boolean changePending;
-	
-	Player player;
-	Map map;
-	
-	//all "types" should be enums so it's easier to see all possible values while programming
-	HashMap<LandType, Land> landMap;
-	HashMap<StructureType, Structure> structMap;
-	HashMap<CreatureType, Creature> creatureMap;
-	
-	BufferedImage girl;
-	BufferedImage guy;
-    
-    public GameState gameState;
-    public AuxState auxState;
-    
-    //GUI elements
-    Frame frmMain;
-    
-    gamegui.Window wndMain;
-    gamegui.Window wndCreateAccount;
-    gamegui.Window wndChooseClass;
-    gamegui.Window wndGameInfo;
-    gamegui.Window wndCredits;
-    
-    RadioGroup rdgGenderSelection;
-    RadioGroup rdgClassSelection;
-    
-    gamegui.Window wndMessage;
-    gamegui.Window wndProgress;
-    gamegui.Window wndConnecting;
-    
-    Textbox selectedText;
-
-    public LostHavenRPG(GraphicsDevice device) {
-        try {
-            GraphicsConfiguration gc = device.getDefaultConfiguration();
-            frmMain = new Frame(gc);
-            frmMain.setUndecorated(true);
-            frmMain.setIgnoreRepaint(true);
-            device.setFullScreenWindow(frmMain);
-            
-            if (device.isDisplayChangeSupported()) {
-                chooseBestDisplayMode(device);
-            }
-            
-            frmMain.addMouseListener(this);
-            frmMain.addKeyListener(this);
-            frmMain.createBufferStrategy(2);
-            BufferStrategy bufferStrategy = frmMain.getBufferStrategy();
-
-            player = new Player();
-            done = false;
-            changePending = false;
-            
-            gameState = GameState.Main;
-            auxState = AuxState.None;
-            
-            loadMap();
-        	map = new Map("mapInfo.txt", "structInfo.txt", landMap, structMap);
-        	map.getLoc(10, 10).addCreature(new Creature());
-            initGUIElements();
-            
-            while (!done) {
-                Graphics g = bufferStrategy.getDrawGraphics();
-                move();
-                render(g);
-                g.dispose();
-                bufferStrategy.show();
-            }
-        }
-        catch (Exception e) {
-            e.printStackTrace();
-        }
-        finally {
-            device.setFullScreenWindow(null);
-        }
-    }
-    
-    private void initGUIElements() {    	
-    	Font font10 = new Font("Arial", Font.PLAIN, 10);
-    	Font font11 = new Font("Arial", Font.PLAIN, 11);
-    	Font font12 = new Font("Arial", Font.PLAIN, 12);
-    	Font font14 = new Font("Arial", Font.PLAIN, 14);
-    	Font font24 = new Font("Arial", Font.PLAIN, 24);
-    	
-    	wndMain = new gamegui.Window("main", 0, 0, 800, 600, true);
-    	
-    	Animation anmTitle = new Animation("title", 144, 0, 512, 95, 1000/12);
-    	
-    	try {
-    		anmTitle.addFrame(ImageIO.read(getClass().getResource("images/Frame1.png")));
-    		anmTitle.addFrame(ImageIO.read(getClass().getResource("images/Frame2.png")));
-    		anmTitle.addFrame(ImageIO.read(getClass().getResource("images/Frame3.png")));
-    		anmTitle.addFrame(ImageIO.read(getClass().getResource("images/Frame4.png")));
-    		anmTitle.addFrame(ImageIO.read(getClass().getResource("images/Frame5.png")));
-    	}catch(IOException ioe) {
-    		ioe.printStackTrace();
-    	}
-    	wndMain.add(anmTitle);
-        
-    	wndMain.add(new gamegui.Button("new game", 500, 140, 200, 40, "New Game", font12));
-    	wndMain.add(new gamegui.Button("load game", 500, 230, 200, 40, "Load Game", font12));
-    	wndMain.add(new gamegui.Button("game info", 500, 320, 200, 40, "Game Information", font12));
-    	wndMain.add(new gamegui.Button("credits", 500, 410, 200, 40, "Credits", font12));
-    	wndMain.add(new gamegui.Button("quit", 500, 500, 200, 40, "Quit", font12));
-    	
-    	wndCreateAccount = new gamegui.Window("create account", 0, 0, 800, 600, true);
-    	
-    	rdgGenderSelection = new RadioGroup("gender selection", 400, 315, 190, 30, "Gender:", font12);
-    	
-    	rdgGenderSelection.add(new RadioButton("male", 438, 318, 24, 24, "Male", font11, false));
-    	rdgGenderSelection.add(new RadioButton("female", 528, 318, 24, 24, "Female", font11, false));
-    	
-    	wndCreateAccount.add(new gamegui.Label("title", 250, 15, 300, 20, "Create an Account", font24, true));
-    	wndCreateAccount.add(new Textbox("user", 400, 150, 190, 30, "Username:", font12, false));
-    	wndCreateAccount.add(rdgGenderSelection);
-    	wndCreateAccount.add(new gamegui.Label("show class", 330, 370, 70, 30, "None", font12, false));
-    	wndCreateAccount.add(new gamegui.Button("choose class", 400, 370, 190, 30, "Choose Your Class", font12));
-    	wndCreateAccount.add(new gamegui.Button("create", 245, 520, 140, 30, "Create", font12));
-    	wndCreateAccount.add(new gamegui.Button("cancel", 415, 520, 140, 30, "Cancel", font12));
-    
-    	wndChooseClass = new gamegui.Window("choose class", 0, 0, 800, 600, true);
-    	
-    	rdgClassSelection = new RadioGroup("class selection", 0, 0, 0, 0, "", font12);
-    	
-    	rdgClassSelection.add(new RadioButton("fighter", 138, 88, 24, 24, "Fighter", font14, true));
-    	rdgClassSelection.add(new RadioButton("ranger", 138, 158, 24, 24, "Ranger", font14, true));
-    	rdgClassSelection.add(new RadioButton("barbarian", 138, 228, 24, 24, "Barbarian", font14, true));
-    	rdgClassSelection.add(new RadioButton("sorceror", 138, 298, 24, 24, "Sorceror", font14, true));
-    	rdgClassSelection.add(new RadioButton("druid", 138, 368, 24, 24, "Druid", font14, true));
-    	rdgClassSelection.add(new RadioButton("wizard", 138, 438, 24, 24, "Wizard", font14, true));
-    	
-    	wndChooseClass.add(new gamegui.Label("title", 250, 15, 300, 20, "Choose a Character", font24, true));
-    	wndChooseClass.add(rdgClassSelection);
-    	wndChooseClass.add(new gamegui.Label("fighter", 170, 114, 170, 0, "A resolute and steadfast champion who has perfected the art of battle and his skill in melee weapons", font10, false));
-    	wndChooseClass.add(new gamegui.Label("ranger", 170, 184, 170, 0, "A skilled combatant who sneaks up on his opponents or shoots them from afar before they know it", font10, false));
-    	wndChooseClass.add(new gamegui.Label("barbarian", 170, 254, 170, 0, "A wild warrior who is unstoppable in battle and uses his own fury to strengthen his attacks", font10, false));
-    	wndChooseClass.add(new gamegui.Label("sorceror", 170, 324, 170, 0, "A chaotic spellcaster who uses his charisma and force of will to power his spells", font10, false));
-    	wndChooseClass.add(new gamegui.Label("druid", 170, 394, 170, 0, "A mystical enchanter who relies on the power of nature and his wisdom to work his magic", font10, false));
-    	wndChooseClass.add(new gamegui.Label("wizard", 170, 464, 170, 0, "A methodical and studious character who studies his opponents to know how to best attack them", font10, false));
-    	wndChooseClass.add(new gamegui.Button("select", 245, 520, 140, 30, "Select", font12));
-    	wndChooseClass.add(new gamegui.Button("cancel", 415, 520, 140, 30, "Cancel", font12));
-    	
-    	wndMessage = new gamegui.Window("message", 290, 135, 220, 160, false);
-		wndMessage.add(new gamegui.Label("label", 70, 15, 80, 12, "none", font12, true));
-		wndMessage.add(new gamegui.Button("button", 70, 115, 80, 30, "OK", font12));
-    }
-    
-    private void loadMap() {
-    	landMap = new HashMap<LandType, Land>();
-    	structMap = new HashMap<StructureType, Structure>();
-    	BufferedImage nullImg = null;
-    	
-    	try {
-    		girl = ImageIO.read(getClass().getResource("images/ArmoredGirl.png"));
-    		guy = ImageIO.read(getClass().getResource("images/ArmoredGuy.png"));
-    	}catch(IOException ioe) {
-    		ioe.printStackTrace();
-    	}
-    		
-    	landMap.put(LandType.Ocean, new Land(LandType.Ocean, "Ocean.png", false));
-    	landMap.put(LandType.Grass, new Land(LandType.Grass, "Grass.png", true));
-    	
-    	structMap.put(StructureType.None, new Structure(StructureType.None, nullImg, true));
-    	structMap.put(StructureType.BlueOrb, new Structure(StructureType.BlueOrb, "Blue Orb.png", false));
-    	structMap.put(StructureType.Cave, new Structure(StructureType.Cave, "Cave.png", false));
-    	structMap.put(StructureType.Gravestone, new Structure(StructureType.Gravestone, "Gravestone.png", false));
-    	structMap.put(StructureType.GraveyardFence1, new Structure(StructureType.GraveyardFence1, "HorGrave.png", false));
-    	structMap.put(StructureType.GraveyardFence2, new Structure(StructureType.GraveyardFence2, "VerGrave.png", false));
-    	structMap.put(StructureType.PicketFence1, new Structure(StructureType.PicketFence1, "HorPalisade.png", false));
-    	structMap.put(StructureType.PicketFence2, new Structure(StructureType.PicketFence2, "VerPalisade.png", false));
-    	structMap.put(StructureType.Hut, new Structure(StructureType.Hut, "Hut.png", false));
-    	structMap.put(StructureType.WitchHut, new Structure(StructureType.WitchHut, "Witch Hut.png", false));
-    	structMap.put(StructureType.Tent, new Structure(StructureType.Tent, "Tent.png", false));
-    	structMap.put(StructureType.LargeTent, new Structure(StructureType.LargeTent, "LargeTent.png", false));
-    	structMap.put(StructureType.House, new Structure(StructureType.House, "House.png", false));
-    	structMap.put(StructureType.Tree, new Structure(StructureType.Tree, "Trees.png", false));
-    	structMap.put(StructureType.BlueOrb, new Structure(StructureType.BlueOrb, "Blue Orb.png", false));
-    	structMap.put(StructureType.RedOrb, new Structure(StructureType.RedOrb, "Red Orb.png", false));
-    	structMap.put(StructureType.LoginPedestal, new Structure(StructureType.LoginPedestal, "YellowPedestal.png", true));
-    	structMap.put(StructureType.RejuvenationPedestal, new Structure(StructureType.RejuvenationPedestal, "PurplePedestal.png", true));
-    	structMap.put(StructureType.LifePedestal, new Structure(StructureType.LifePedestal, "RedPedestal.png", true));
-    	structMap.put(StructureType.ManaPedestal, new Structure(StructureType.ManaPedestal, "BluePedestal.png", true));
-    }
-    
-    private void move() {
-    	double dist = player.getSpeed()*(System.currentTimeMillis()-player.getLastMoved())/1000;
-    	Point lastLoc = player.getLoc();
-    	Point target = player.getTarget();
-    	Point newLoc;
-    	
-    	player.setLastMoved(System.currentTimeMillis());
-    	if(Point.dist(lastLoc, player.getTarget()) <= dist)
-    		player.setLoc(player.getTarget());
-    	else {
-    		int xDif = (int)(Point.xDif(lastLoc, target)*dist/Point.dist(lastLoc, target));
-    		int yDif = (int)(Point.yDif(lastLoc, target)*dist/Point.dist(lastLoc, target));
-    		newLoc = new Point(lastLoc.getX(), lastLoc.getXMin()+xDif, lastLoc.getY(), lastLoc.getYMin()+yDif);
-    		newLoc.setX(newLoc.getX()+newLoc.getXMin()/100);
-    		newLoc.setXMin(newLoc.getXMin()%100);
-    		newLoc.setY(newLoc.getY()+newLoc.getYMin()/100);
-    		newLoc.setYMin(newLoc.getYMin()%100);
-    		if(newLoc.getXMin()<0) {
-    			newLoc.setX(newLoc.getX()-1);
-    			newLoc.setXMin(newLoc.getXMin()+100);
-    		}else if(newLoc.getYMin()<0) {
-    			newLoc.setY(newLoc.getY()-1);
-    			newLoc.setYMin(newLoc.getYMin()+100);
-    		}
-    		if(map.getLoc(newLoc.getX()/100, newLoc.getY()/100).isPassable())
-    			player.setLoc(newLoc);
-    		else
-    			player.setTarget(player.getLoc());
-    	}
-    }
-    
-    private void render(Graphics g) {
-    	g.setColor(Color.black);
-        g.fillRect(0, 0, 800, 600);
-        
-        switch(gameState) {
-		case Main:
-			drawMain(g);
-			break;
-		case CreateAccount:
-			drawCreateAccount(g);
-			break;
-		case CreateClass:
-			drawCreateClass(g);
-			break;
-		case LoadGame:
-			drawLoadGame(g);
-			break;
-		case Info:
-			drawInfo(g);
-			break;
-		case Credits:
-			drawCredits(g);
-			break;
-		case Game:
-			calculateMapVertices();
-            drawMap(g);
-            drawItems(g);
-            drawCreatures(g);
-            drawChar(g);
-            drawStatDisplay(g);
-            drawChat(g);
-			break;
-		case GameMenu:
-			calculateMapVertices();
-            drawMap(g);
-            drawItems(g);
-            drawCreatures(g);
-            drawChar(g);
-            drawStatDisplay(g);
-            drawChat(g);
-            drawGameMenu(g);
-			break;
-		case GameInventory:
-			calculateMapVertices();
-            drawMap(g);
-            drawItems(g);
-            drawCreatures(g);
-            drawChar(g);
-            drawStatDisplay(g);
-            drawChat(g);
-            drawGameInventory(g);
-			break;
-		case GameStats:
-			calculateMapVertices();
-            drawMap(g);
-            drawItems(g);
-            drawCreatures(g);
-            drawChar(g);
-            drawStatDisplay(g);
-            drawChat(g);
-            drawGameStats(g);
-			break;
-		}
-        
-        switch(auxState) {
-		case None:
-			break;
-		case MsgBox:
-			wndMessage.draw(g);
-			break;
-		}
-    }
-    
-    public static String dateString() {
-		return new SimpleDateFormat("MM/dd/yyyy HH:mm:ss").format(new Date());
-	}
-    
-    public void showMessage(String text) {
-    	auxState = AuxState.MsgBox;
-    	((gamegui.Label)wndMessage.getMember("label")).setText(text);
-    }
-    
-    private void calculateMapVertices() {
-    
-    }
-    
-    private void drawMain(Graphics g) {
-    	wndMain.draw(g);
-    	
-    	g.setColor(Color.red);
-		g.drawRect(10, 100, 380, 490);
-		g.drawRect(410, 100, 380, 490);
-    }
-    
-    private void drawCreateAccount(Graphics g) {    	
-    	wndCreateAccount.draw(g);
-    }
-    
-    private void drawCreateClass(Graphics g) {
-    	wndChooseClass.draw(g);
-    }
-    
-    private void drawLoadGame(Graphics g) {
-    	Font tempFont = new Font("Arial", Font.PLAIN, 12);
-    	FontMetrics metrics = g.getFontMetrics(tempFont);
-    	
-    	g.setFont(tempFont);
-    	g.setColor(Color.green);
-    	g.drawString("There is not a whole lot here right now. You can click anywhere on the screen to get back to the main menu.", 0, metrics.getHeight());
-    }
-    
-    private void drawInfo(Graphics g) {
-    	Font tempFont = new Font("Arial", Font.PLAIN, 12);
-    	FontMetrics metrics = g.getFontMetrics(tempFont);
-    	
-    	g.setFont(tempFont);
-    	g.setColor(Color.green);
-    	g.drawString("There is not a whole lot here right now. You can click anywhere on the screen to get back to the main menu.", 0, metrics.getHeight());
-    }
-    
-    private void drawCredits(Graphics g) {
-    	Font tempFont = new Font("Arial", Font.PLAIN, 12);
-    	FontMetrics metrics = g.getFontMetrics(tempFont);
-    	
-    	g.setFont(tempFont);
-    	g.setColor(Color.green);
-    	g.drawString("There is not a whole lot here right now. You can click anywhere on the screen to get back to the main menu.", 0, metrics.getHeight());
-    }
-    
-    private void drawMap(Graphics g) {
-    	int locX = player.getLoc().getX();
-    	int locY = player.getLoc().getY();
-    	int xLow = locX/100-4;
-    	int xHigh = xLow+9;
-    	int yLow = locY/100-3;
-    	int yHigh = yLow+7;
-    	
-    	if(xLow<0)
-    		xLow = 0;
-    	if(xHigh>=map.getLength())
-    		xHigh = map.getLength()-1;
-    	if(yLow<0)
-    		yLow = 0;
-    	if(yHigh>=map.getHeight())
-    		yHigh = map.getHeight()-1;
-
-		for(int x=xLow; x<xHigh; x++) {
-			for(int y=yLow; y<yHigh; y++) {
-				g.drawImage(map.getLoc(x, y).getLand().getImg(), 400+x*100-locX, 300+y*100-locY, null);				
-				g.drawImage(map.getLoc(x, y).getStruct().getImg(), 400+x*100-locX, 300+y*100-locY, null);
-			}
-		}
-    }
-    
-    private void drawItems(Graphics g) {
-    
-    }
-    
-    private void drawCreatures(Graphics g) {
-    
-    }
-    
-    private void drawChar(Graphics g) {
-    	switch(player.getGender()) {
-		case Female:
-			g.drawImage(girl, 375, 200, null);
-			break;
-		case Male:
-			g.drawImage(guy, 375, 200, null);
-			break;
-		}
-    }
-    
-    private void drawStatDisplay(Graphics g) {
-    
-    }
-    
-    private void drawChat(Graphics g) {
-    
-    }
-    
-    private void drawGameMenu(Graphics g) {
-    
-    }
-    
-    private void drawGameInventory(Graphics g) {
-    
-    }
-    
-    private void drawGameStats(Graphics g) {
-    
-    }
-    
-    private void selectText(Textbox text) {
-    	if(selectedText != null)
-			selectedText.setSelected(false);
-		selectedText = text;
-		
-		if(text != null)
-			text.setSelected(true);
-    }
-    
-    private static DisplayMode getBestDisplayMode(GraphicsDevice device) {
-        for (int x = 0; x < BEST_DISPLAY_MODES.length; x++) {
-            DisplayMode[] modes = device.getDisplayModes();
-            for (int i = 0; i < modes.length; i++) {
-                if (modes[i].getWidth() == BEST_DISPLAY_MODES[x].getWidth()
-                   && modes[i].getHeight() == BEST_DISPLAY_MODES[x].getHeight()
-                   && modes[i].getBitDepth() == BEST_DISPLAY_MODES[x].getBitDepth()) 
-                {
-                    return BEST_DISPLAY_MODES[x];
-                }
-            }
-        }
-        return null;
-    }
-    
-    public static void chooseBestDisplayMode(GraphicsDevice device) {
-        DisplayMode best = getBestDisplayMode(device);
-        if (best != null) {
-            device.setDisplayMode(best);
-        }
-    }
-    
-    public void mousePressed(MouseEvent e) {
-    	switch(auxState) {
-		case None:
-			switch(gameState) {
-			case Main:				
-				if(wndMain.getMember("new game").isClicked(e.getX(),e.getY()))
-					gameState = GameState.CreateAccount;
-				else if(wndMain.getMember("load game").isClicked(e.getX(),e.getY()))
-					gameState = GameState.LoadGame;
-				else if(wndMain.getMember("game info").isClicked(e.getX(),e.getY()))
-					gameState = GameState.Info;
-				else if(wndMain.getMember("credits").isClicked(e.getX(),e.getY()))
-					gameState = GameState.Credits;
-				else if(wndMain.getMember("quit").isClicked(e.getX(),e.getY()))
-					done = true;
-				break;
-			case CreateAccount:
-				if(wndCreateAccount.getMember("user").isClicked(e.getX(),e.getY()))
-					selectText((Textbox)wndCreateAccount.getMember("user"));
-				else if(wndCreateAccount.getMember("choose class").isClicked(e.getX(),e.getY())) {
-					selectText(null);
-					gameState = GameState.CreateClass;
-				}else if(wndCreateAccount.getMember("create").isClicked(e.getX(),e.getY())) {
-					String user = ((Textbox)wndCreateAccount.getMember("user")).getText();
-					Gender gender = Gender.valueOf(rdgGenderSelection.getButton(rdgGenderSelection.getSelected()).getLabel());
-					
-					if(user.equals("")) {
-						showMessage("The username is empty");
-					}else if(gender == Gender.None) {
-						showMessage("No gender has been selected");
-					}else{
-						player = new Player(user, gender);
-						player.setSpeed(200);
-						player.setLoc(new Point(750, 860));
-						player.setTarget(player.getLoc());
-						gameState = GameState.Game;
-					}
-				}else if(wndCreateAccount.getMember("cancel").isClicked(e.getX(),e.getY())) {
-					selectText(null);
-					wndCreateAccount.clear();
-					wndChooseClass.clear();
-					gameState = GameState.Main;
-				}else if(wndCreateAccount.handleEvent(e)) {
-				}
-				break;
-			case CreateClass:
-				if(wndChooseClass.getMember("select").isClicked(e.getX(),e.getY())) {
-					gameState = GameState.CreateAccount;
-				}
-				else if(wndChooseClass.getMember("cancel").isClicked(e.getX(),e.getY())) {
-					gameState = GameState.CreateAccount;
-				}else if(wndChooseClass.handleEvent(e)) {
-				}
-				break;
-			case LoadGame:
-				gameState = GameState.Main;
-				break;
-			case Info:
-				gameState = GameState.Main;
-				break;
-			case Credits:
-				gameState = GameState.Main;
-				break;
-			case Game:
-				int newX = player.getLoc().getX()+e.getX()-400;
-				int newY = player.getLoc().getY()+e.getY()-300;
-				if(map.getLoc((int)(Math.floor(newX/100)), (int)(Math.floor(newY/100))).isPassable()) {
-					player.setTarget(new Point(newX, newY));
-					player.setLastMoved(System.currentTimeMillis());
-				}
-				break;
-			case GameMenu:
-				break;
-			case GameInventory:
-				break;
-			case GameStats:
-				break;
-			}
-			break;
-		case MsgBox:
-			if(wndMessage.getMember("button").isClicked(e.getX(), e.getY())) {
-				auxState = AuxState.None;
-			}
-			break;
-		}
-	}
-	
-	public void mouseReleased(MouseEvent e) {
-		
-	}
-	
-	public void mouseEntered(MouseEvent e) {
-
-	}
-	
-	public void mouseExited(MouseEvent e) {
-	    
-	}
-	
-	public void mouseClicked(MouseEvent e) {
-		
-	}
- 
-	public void keyTyped(KeyEvent e) {
-		
-	}
-	
-	public void keyPressed(KeyEvent e) {
-		if(selectedText != null)
-			selectedText.handleEvent(e);
-		
-		if(e.getKeyCode() == KeyEvent.VK_ESCAPE) 
-			if(gameState == GameState.Game)
-				gameState = GameState.Main;
-			else
-				done = true;
-	}
-	
-	public void keyReleased(KeyEvent e) {
-	
-	}
-    
-	public static void main(String[] args) {
-		try {
-			PrintStream st = new PrintStream(new FileOutputStream("err.txt", true));
-			System.setErr(st);
-			System.setOut(st);
-			System.out.println("-----[ Session started on " + dateString() + " ]-----");
-			
-			GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
-			GraphicsDevice device = env.getDefaultScreenDevice();
-			new LostHavenRPG(device);
-        }
-		catch (Exception e) {
-			e.printStackTrace();
-        }
-		System.exit(0);
-	}
-}
Index: p.java
===================================================================
--- Map.java	(revision a5b4186ca52f455a110a593c9a58bf9ebeceb07c)
+++ 	(revision )
@@ -1,76 +1,0 @@
-import java.io.*;
-import java.util.*;
-
-public class Map {
-	private Location[][] grid;
-	
-	public Map(int x, int y) {
-		grid = new Location[x][y];
-	}
-	
-	public Map(String landFile, String structFile, HashMap<LandType, Land> landMap, HashMap<StructureType, Structure> structMap) {
-		try {
-			int length, height, x, y;
-			String str, loc;
-			BufferedReader in = new BufferedReader(new FileReader(landFile));
-			
-			str = in.readLine();
-			length = Integer.parseInt(str.substring(0, str.indexOf("x")));
-			height = Integer.parseInt(str.substring(str.indexOf("x")+1));
-			grid = new Location[length][height];
-			
-			for(x=0; x<height; x++) {
-				str = in.readLine();
-				for(y=0; y<length; y++) {
-					if(str.indexOf(",") == -1)
-						loc = str;
-					else {
-						loc = str.substring(0, str.indexOf(","));
-						str = str.substring(str.indexOf(",")+1);
-					}
-					
-					if(loc.equals("o")) {
-						loc = "Ocean";
-					}else if(loc.equals("1")) {
-						loc = "Grass";
-					}
-					
-					grid[y][x] = new Location(landMap.get(LandType.valueOf(loc)), structMap.get(StructureType.None));
-				}
-			}
-			
-			in.close();
-			
-			in = new BufferedReader(new FileReader(structFile));
-			
-			while((loc = in.readLine()) != null) {
-				str = in.readLine();
-				x = Integer.valueOf(str.substring(0, str.indexOf(",")));
-				y = Integer.valueOf(str.substring(str.indexOf(",")+1));
-				
-				grid[x-1][y-1].setStruct(structMap.get(StructureType.valueOf(loc)));
-			}
-		} catch(IOException ioe) {
-			ioe.printStackTrace();
-		}
-	}
-	
-	public Location getLoc(int x, int y) {
-		return grid[x][y];
-	}
-	
-	public void setLoc(Location loc, int x, int y) {
-		grid[x][y] = loc;
-	}
-	
-	public int getLength() {
-		return grid.length;
-	}
-	
-	public int getHeight() {
-		if(grid.length>0)
-			return grid[0].length;
-		else
-			return 0;
-	}
-}
Index: pElement.java
===================================================================
--- MapElement.java	(revision a5b4186ca52f455a110a593c9a58bf9ebeceb07c)
+++ 	(revision )
@@ -1,39 +1,0 @@
-import java.awt.image.*;
-import java.io.IOException;
-
-import javax.imageio.ImageIO;
-
-public class MapElement {
-	private BufferedImage img;
-	private boolean passable;
-	
-	public MapElement(BufferedImage img, boolean passable) {
-		this.img = img;
-		this.passable = passable;
-	}
-	
-	public MapElement(String imgFile, boolean passable) {
-		try {
-			img = ImageIO.read(getClass().getResource("images/"+imgFile));
-			this.passable = passable;
-		}catch(IOException ioe) {
-    		ioe.printStackTrace();
-    	}
-	}
-	
-	public BufferedImage getImg() {
-		return img;
-	}
-	
-	public boolean isPassable() {
-		return passable;
-	}
-	
-	public void setImg(BufferedImage img) {
-		this.img = img;
-	}
-	
-	public void setPassable(boolean passable) {
-		this.passable = passable;
-	}
-}
Index: ayer.java
===================================================================
--- Player.java	(revision a5b4186ca52f455a110a593c9a58bf9ebeceb07c)
+++ 	(revision )
@@ -1,45 +1,0 @@
-
-public class Player extends Creature {
-	private Point target;
-	private int experience;
-	private int gold;
-	
-	public Player() {
-		super();
-		target = new Point(0, 0);
-	}
-
-	public Player(String name) {
-		super(name);
-		target = new Point(0, 0);
-	}
-	
-	public Player(String name, Gender gender) {
-		super(name, gender);
-		target = new Point(0, 0);
-	}
-	
-	public int getExperience() {
-		return experience;
-	}
-	
-	public int getGold() {
-		return gold;
-	}
-	
-	public Point getTarget() {
-		return target;
-	}
-	
-	public void setExperience(int experience) {
-		this.experience = experience;
-	}
-	
-	public void setGold(int gold) {
-		this.gold = gold;
-	}
-	
-	public void setTarget(Point target) {
-		this.target = target;
-	}
-}
Index: int.java
===================================================================
--- Point.java	(revision a5b4186ca52f455a110a593c9a58bf9ebeceb07c)
+++ 	(revision )
@@ -1,74 +1,0 @@
-
-public class Point {
-	private int x;
-	private int xMin;
-	private int y;
-	private int yMin;
-	
-	public Point() {
-		x = 0;
-		y = 0;
-	}
-
-	public Point(int x, int y) {
-		this.x = x;
-		this.xMin = 0;
-		this.y = y;
-		this.yMin = 0;
-	}
-	
-	public Point(int x, int xMin, int y, int yMin) {
-		this.x = x;
-		this.xMin = xMin;
-		this.y = y;
-		this.yMin = yMin;
-	}
-
-	public int getX() {
-		return x;
-	}
-	
-	public int getXMin() {
-		return xMin;
-	}
-
-	public int getY() {
-		return y;
-	}
-	
-	public int getYMin() {
-		return yMin;
-	}
-
-	public void setX(int x) {
-		this.x = x;
-	}
-	
-	public void setXMin(int xMin) {
-		this.xMin = xMin;
-	}
-
-	public void setY(int y) {
-		this.y = y;
-	}
-	
-	public void setYMin(int yMin) {
-		this.yMin = yMin;
-	}
-	
-	public String toString() {
-		return x+","+y;
-	}
-	
-	public static int xDif(Point p1, Point p2) {
-		return 100*(p2.x-p1.x)+p2.xMin-p1.xMin;
-	}
-	
-	public static int yDif(Point p1, Point p2) {
-		return 100*(p2.y-p1.y)+p2.yMin-p1.yMin;
-	}
-	
-	public static double dist(Point p1, Point p2) {
-		return Math.sqrt(Math.pow(p1.x+p1.xMin/100-p2.x-p2.xMin/100, 2)+Math.pow(p1.y+p1.yMin/100-p2.y-p2.yMin/100, 2));
-	}
-}
Index: awnPoint.java
===================================================================
--- SpawnPoint.java	(revision a5b4186ca52f455a110a593c9a58bf9ebeceb07c)
+++ 	(revision )
@@ -1,24 +1,0 @@
-
-public class SpawnPoint {
-	Point loc;
-	long lastSpawned;
-	long interval;
-	Creature creature;
-	
-	public SpawnPoint(Point loc, long interval, Creature creature) {
-		this.loc = loc;
-		this.interval = interval;
-		this.creature = creature;
-		lastSpawned = 0;
-	}
-	
-	//calling class handles the actual spawning of the creature if this method returns true
-	public boolean spawn() {
-		if((System.currentTimeMillis()-lastSpawned) >= interval) {
-			lastSpawned = System.currentTimeMillis();
-			return true;
-		}else {
-			return false;
-		}
-	}
-}
Index: ructure.java
===================================================================
--- Structure.java	(revision a5b4186ca52f455a110a593c9a58bf9ebeceb07c)
+++ 	(revision )
@@ -1,22 +1,0 @@
-import java.awt.image.*;
-
-
-public class Structure extends MapElement {
-private StructureType type;
-	
-	public Structure(StructureType type, BufferedImage img, boolean passable) {
-		super(img, passable);
-		
-		this.type = type;
-	}
-	
-	public Structure(StructureType type, String imgFile, boolean passable) {
-		super(imgFile, passable);
-		
-		this.type = type;
-	}
-	
-	public StructureType getType() {
-		return type;
-	}
-}
Index: ructureType.java
===================================================================
--- StructureType.java	(revision a5b4186ca52f455a110a593c9a58bf9ebeceb07c)
+++ 	(revision )
@@ -1,22 +1,0 @@
-
-public enum StructureType {
-    None,
-    Tent,
-    LargeTent,
-    House,
-    Cave,
-    Gravestone,
-    GraveyardFence1,
-    GraveyardFence2,
-    PicketFence1,
-    PicketFence2,
-    Hut,
-    WitchHut,
-    Tree,
-    BlueOrb,
-    RedOrb,
-    LoginPedestal,
-    RejuvenationPedestal,
-    LifePedestal,
-    ManaPedestal
-}
Index: main/AuxState.java
===================================================================
--- main/AuxState.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
+++ main/AuxState.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
@@ -0,0 +1,6 @@
+package main;
+
+public enum AuxState {
+    None,
+    MsgBox
+}
Index: main/Creature.java
===================================================================
--- main/Creature.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
+++ main/Creature.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
@@ -0,0 +1,220 @@
+package main;
+
+import java.awt.image.*;
+
+public class Creature {
+	private String name;
+	private CreatureType type;
+	private BufferedImage img;
+	private Gender gender;
+	private int level;
+	private Point loc;
+	private int speed;
+	private long lastMoved;
+	private int attackSpeed;
+	private int damage;
+	private long lastAttacked;
+	private int strength;
+	private int dexterity;
+	private int constitution;
+	private int charisma;
+	private int wisdom;
+	private int intelligence;
+	private int hitpoints;
+	private int manapoints;
+	private int maxHitpoints;
+	private int maxManapoints;
+	
+	public Creature() {
+		name = "";
+		gender = Gender.None;
+		loc = new Point(0, 0);
+	}
+
+	public Creature(String name) {
+		this.name = name;
+		loc = new Point(0, 0);
+	}
+	
+	public Creature(String name, Gender gender) {
+		this.name = name;
+		this.gender = gender;
+		loc = new Point(0, 0);
+	}
+	
+	public int getAttackSpeed() {
+		return attackSpeed;
+	}
+
+	public int getCharisma() {
+		return charisma;
+	}
+
+	public int getConstitution() {
+		return constitution;
+	}
+
+	public int getDamage() {
+		return damage;
+	}
+
+	public int getDexterity() {
+		return dexterity;
+	}
+
+	public Gender getGender() {
+		return gender;
+	}
+
+	public int getHitpoints() {
+		return hitpoints;
+	}
+	
+	public BufferedImage getImg() {
+		return img;
+	}
+
+	public int getIntelligence() {
+		return intelligence;
+	}
+
+	public long getLastAttacked() {
+		return lastAttacked;
+	}
+
+	public long getLastMoved() {
+		return lastMoved;
+	}
+
+	public int getLevel() {
+		return level;
+	}
+
+	public Point getLoc() {
+		return loc;
+	}
+
+	public int getManapoints() {
+		return manapoints;
+	}
+
+	public int getMaxHitpoints() {
+		return maxHitpoints;
+	}
+
+	public int getMaxManapoints() {
+		return maxManapoints;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public int getSpeed() {
+		return speed;
+	}
+
+	public int getStrength() {
+		return strength;
+	}
+	
+	public CreatureType getType() {
+		return type;
+	}
+
+	public int getWisdom() {
+		return wisdom;
+	}
+
+	public void setAttackSpeed(int attackSpeed) {
+		this.attackSpeed = attackSpeed;
+	}
+
+	public void setCharisma(int charisma) {
+		this.charisma = charisma;
+	}
+
+	public void setConstitution(int constitution) {
+		this.constitution = constitution;
+	}
+
+	public void setDamage(int damage) {
+		this.damage = damage;
+	}
+
+	public void setDexterity(int dexterity) {
+		this.dexterity = dexterity;
+	}
+
+	public void setGender(Gender gender) {
+		this.gender = gender;
+	}
+
+	public void setHitpoints(int hitpoints) {
+		this.hitpoints = hitpoints;
+	}
+	
+	public void setImg(BufferedImage img) {
+		this.img = img;
+	}
+ 
+	public void setIntelligence(int intelligence) {
+		this.intelligence = intelligence;
+	}
+
+	public void setLastAttacked(long lastAttacked) {
+		this.lastAttacked = lastAttacked;
+	}
+
+	public void setLastMoved(long lastMoved) {
+		this.lastMoved = lastMoved;
+	}
+
+	public void setLevel(int level) {
+		this.level = level;
+	}
+
+	public void setLoc(Point loc) {
+		this.loc = loc;
+	}
+
+	public void setManapoints(int manapoints) {
+		this.manapoints = manapoints;
+	}
+
+	public void setMaxHitpoints(int maxHitpoints) {
+		this.maxHitpoints = maxHitpoints;
+	}
+
+	public void setMaxManapoints(int maxManapoints) {
+		this.maxManapoints = maxManapoints;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public void setSpeed(int speed) {
+		this.speed = speed;
+	}
+
+	public void setStrength(int strength) {
+		this.strength = strength;
+	}
+	
+	public void setType(CreatureType type) {
+		this.type = type;
+	}
+
+	public void setWisdom(int wisdom) {
+		this.wisdom = wisdom;
+	}
+	
+	public String toString() {
+		return name;
+	}
+	
+	public boolean equals(Object c) {
+		return name.trim().equals(((Creature)c).name.trim());
+	}
+}
Index: main/CreatureType.java
===================================================================
--- main/CreatureType.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
+++ main/CreatureType.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
@@ -0,0 +1,5 @@
+package main;
+
+public enum CreatureType {
+
+}
Index: main/GameState.java
===================================================================
--- main/GameState.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
+++ main/GameState.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
@@ -0,0 +1,14 @@
+package main;
+
+public enum GameState {
+    Main,
+    CreateAccount,
+    CreateClass,
+    LoadGame,
+    Info,
+    Credits,
+    Game,
+    GameMenu,
+    GameInventory,
+    GameStats
+}
Index: main/Gender.java
===================================================================
--- main/Gender.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
+++ main/Gender.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
@@ -0,0 +1,7 @@
+package main;
+
+public enum Gender {
+    None,
+    Male,
+    Female
+}
Index: main/Job.java
===================================================================
--- main/Job.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
+++ main/Job.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
@@ -0,0 +1,11 @@
+package main;
+
+public enum Job {
+    None,
+    Fighter,
+    Ranger,
+    Barbarian,
+    Sorceror,
+    Druid,
+    Wizard
+}
Index: main/Land.java
===================================================================
--- main/Land.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
+++ main/Land.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
@@ -0,0 +1,23 @@
+package main;
+
+import java.awt.image.*;
+
+public class Land extends MapElement {
+	private LandType type;
+	
+	public Land(LandType type, BufferedImage img, boolean passable) {
+		super(img, passable);
+
+		this.type = type;
+	}
+	
+	public Land(LandType type, String imgFile, boolean passable) {
+		super(imgFile, passable);
+		
+		this.type = type;
+	}
+	
+	public LandType getType() {
+		return type;
+	}
+}
Index: main/LandType.java
===================================================================
--- main/LandType.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
+++ main/LandType.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
@@ -0,0 +1,6 @@
+package main;
+
+public enum LandType {
+	Grass,
+	Ocean
+}
Index: main/Location.java
===================================================================
--- main/Location.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
+++ main/Location.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
@@ -0,0 +1,39 @@
+package main;
+
+import java.util.*;
+
+public class Location {
+	private Land land;
+	private Structure structure;
+	private PriorityQueue<Creature> creatures;
+	
+	public Location(Land land, Structure structure) {
+		this.land = land;
+		this.structure = structure;
+		this.creatures = new PriorityQueue<Creature>();
+	}
+
+	public void addCreature(Creature creature) {
+		creatures.add(creature);
+	}
+	
+	public Land getLand() {
+		return land;
+	}
+
+	public Structure getStruct() {
+		return structure;
+	}
+	
+	public void setLand(Land type) {
+		land = type;
+	}
+	
+	public void setStruct(Structure type) {
+		structure = type;
+	}
+	
+	public boolean isPassable() {
+		return land.isPassable() && structure.isPassable();
+	}
+}
Index: main/LostHavenRPG.java
===================================================================
--- main/LostHavenRPG.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
+++ main/LostHavenRPG.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
@@ -0,0 +1,608 @@
+package main;
+
+import java.awt.*;
+import java.awt.image.*;
+import java.awt.event.*;
+import java.io.*;
+import java.util.*;
+import javax.imageio.*;
+import java.text.*;
+
+import gamegui.*;
+
+/* 
+ * This is the main class in the project. It initializes wide-screen mode and is responsible for drawing to the screen and handling
+ * input.
+ * 
+ * The classes in the gamegui folder are similar to the Swing classes in that they help in building a gui. They are all extended from
+ * the Member class and instances of each of them can be added to a Window class. They also have input-handling functionality.
+ */
+
+public class LostHavenRPG implements KeyListener, MouseListener {
+	private static DisplayMode[] BEST_DISPLAY_MODES = new DisplayMode[] {
+        new DisplayMode(800, 600, 32, 0),
+        new DisplayMode(800, 600, 16, 0),
+        new DisplayMode(800, 600, 8, 0)
+    };
+	
+	boolean done;
+	boolean changePending;
+	
+	Player player;
+	Map map;
+	
+	//all "types" should be enums so it's easier to see all possible values while programming
+	HashMap<LandType, Land> landMap;
+	HashMap<StructureType, Structure> structMap;
+	HashMap<CreatureType, Creature> creatureMap;
+	
+	BufferedImage girl;
+	BufferedImage guy;
+    
+    public GameState gameState;
+    public AuxState auxState;
+    
+    //GUI elements
+    Frame frmMain;
+    
+    gamegui.Window wndMain;
+    gamegui.Window wndCreateAccount;
+    gamegui.Window wndChooseClass;
+    gamegui.Window wndGameInfo;
+    gamegui.Window wndCredits;
+    
+    RadioGroup rdgGenderSelection;
+    RadioGroup rdgClassSelection;
+    
+    gamegui.Window wndMessage;
+    gamegui.Window wndProgress;
+    gamegui.Window wndConnecting;
+    
+    Textbox selectedText;
+
+    public LostHavenRPG(GraphicsDevice device) {
+        try {
+            GraphicsConfiguration gc = device.getDefaultConfiguration();
+            frmMain = new Frame(gc);
+            frmMain.setUndecorated(true);
+            frmMain.setIgnoreRepaint(true);
+            device.setFullScreenWindow(frmMain);
+            
+            if (device.isDisplayChangeSupported()) {
+                chooseBestDisplayMode(device);
+            }
+            
+            frmMain.addMouseListener(this);
+            frmMain.addKeyListener(this);
+            frmMain.createBufferStrategy(2);
+            BufferStrategy bufferStrategy = frmMain.getBufferStrategy();
+
+            player = new Player();
+            done = false;
+            changePending = false;
+            
+            gameState = GameState.Main;
+            auxState = AuxState.None;
+            
+            loadMap();
+        	map = new Map("mapInfo.txt", "structInfo.txt", landMap, structMap);
+        	map.getLoc(10, 10).addCreature(new Creature());
+            initGUIElements();
+            
+            while (!done) {
+                Graphics g = bufferStrategy.getDrawGraphics();
+                move();
+                render(g);
+                g.dispose();
+                bufferStrategy.show();
+            }
+        }
+        catch (Exception e) {
+            e.printStackTrace();
+        }
+        finally {
+            device.setFullScreenWindow(null);
+        }
+    }
+    
+    private void initGUIElements() {    	
+    	Font font10 = new Font("Arial", Font.PLAIN, 10);
+    	Font font11 = new Font("Arial", Font.PLAIN, 11);
+    	Font font12 = new Font("Arial", Font.PLAIN, 12);
+    	Font font14 = new Font("Arial", Font.PLAIN, 14);
+    	Font font24 = new Font("Arial", Font.PLAIN, 24);
+    	
+    	wndMain = new gamegui.Window("main", 0, 0, 800, 600, true);
+    	
+    	Animation anmTitle = new Animation("title", 144, 0, 512, 95, 1000/12);
+    	
+    	try {
+    		anmTitle.addFrame(ImageIO.read(getClass().getResource("images/Frame1.png")));
+    		anmTitle.addFrame(ImageIO.read(getClass().getResource("images/Frame2.png")));
+    		anmTitle.addFrame(ImageIO.read(getClass().getResource("images/Frame3.png")));
+    		anmTitle.addFrame(ImageIO.read(getClass().getResource("images/Frame4.png")));
+    		anmTitle.addFrame(ImageIO.read(getClass().getResource("images/Frame5.png")));
+    	}catch(IOException ioe) {
+    		ioe.printStackTrace();
+    	}
+    	wndMain.add(anmTitle);
+        
+    	wndMain.add(new gamegui.Button("new game", 500, 140, 200, 40, "New Game", font12));
+    	wndMain.add(new gamegui.Button("load game", 500, 230, 200, 40, "Load Game", font12));
+    	wndMain.add(new gamegui.Button("game info", 500, 320, 200, 40, "Game Information", font12));
+    	wndMain.add(new gamegui.Button("credits", 500, 410, 200, 40, "Credits", font12));
+    	wndMain.add(new gamegui.Button("quit", 500, 500, 200, 40, "Quit", font12));
+    	
+    	wndCreateAccount = new gamegui.Window("create account", 0, 0, 800, 600, true);
+    	
+    	rdgGenderSelection = new RadioGroup("gender selection", 400, 315, 190, 30, "Gender:", font12);
+    	
+    	rdgGenderSelection.add(new RadioButton("male", 438, 318, 24, 24, "Male", font11, false));
+    	rdgGenderSelection.add(new RadioButton("female", 528, 318, 24, 24, "Female", font11, false));
+    	
+    	wndCreateAccount.add(new gamegui.Label("title", 250, 15, 300, 20, "Create an Account", font24, true));
+    	wndCreateAccount.add(new Textbox("user", 400, 150, 190, 30, "Username:", font12, false));
+    	wndCreateAccount.add(rdgGenderSelection);
+    	wndCreateAccount.add(new gamegui.Label("show class", 330, 370, 70, 30, "None", font12, false));
+    	wndCreateAccount.add(new gamegui.Button("choose class", 400, 370, 190, 30, "Choose Your Class", font12));
+    	wndCreateAccount.add(new gamegui.Button("create", 245, 520, 140, 30, "Create", font12));
+    	wndCreateAccount.add(new gamegui.Button("cancel", 415, 520, 140, 30, "Cancel", font12));
+    
+    	wndChooseClass = new gamegui.Window("choose class", 0, 0, 800, 600, true);
+    	
+    	rdgClassSelection = new RadioGroup("class selection", 0, 0, 0, 0, "", font12);
+    	
+    	rdgClassSelection.add(new RadioButton("fighter", 138, 88, 24, 24, "Fighter", font14, true));
+    	rdgClassSelection.add(new RadioButton("ranger", 138, 158, 24, 24, "Ranger", font14, true));
+    	rdgClassSelection.add(new RadioButton("barbarian", 138, 228, 24, 24, "Barbarian", font14, true));
+    	rdgClassSelection.add(new RadioButton("sorceror", 138, 298, 24, 24, "Sorceror", font14, true));
+    	rdgClassSelection.add(new RadioButton("druid", 138, 368, 24, 24, "Druid", font14, true));
+    	rdgClassSelection.add(new RadioButton("wizard", 138, 438, 24, 24, "Wizard", font14, true));
+    	
+    	wndChooseClass.add(new gamegui.Label("title", 250, 15, 300, 20, "Choose a Character", font24, true));
+    	wndChooseClass.add(rdgClassSelection);
+    	wndChooseClass.add(new gamegui.Label("fighter", 170, 114, 170, 0, "A resolute and steadfast champion who has perfected the art of battle and his skill in melee weapons", font10, false));
+    	wndChooseClass.add(new gamegui.Label("ranger", 170, 184, 170, 0, "A skilled combatant who sneaks up on his opponents or shoots them from afar before they know it", font10, false));
+    	wndChooseClass.add(new gamegui.Label("barbarian", 170, 254, 170, 0, "A wild warrior who is unstoppable in battle and uses his own fury to strengthen his attacks", font10, false));
+    	wndChooseClass.add(new gamegui.Label("sorceror", 170, 324, 170, 0, "A chaotic spellcaster who uses his charisma and force of will to power his spells", font10, false));
+    	wndChooseClass.add(new gamegui.Label("druid", 170, 394, 170, 0, "A mystical enchanter who relies on the power of nature and his wisdom to work his magic", font10, false));
+    	wndChooseClass.add(new gamegui.Label("wizard", 170, 464, 170, 0, "A methodical and studious character who studies his opponents to know how to best attack them", font10, false));
+    	wndChooseClass.add(new gamegui.Button("select", 245, 520, 140, 30, "Select", font12));
+    	wndChooseClass.add(new gamegui.Button("cancel", 415, 520, 140, 30, "Cancel", font12));
+    	
+    	wndMessage = new gamegui.Window("message", 290, 135, 220, 160, false);
+		wndMessage.add(new gamegui.Label("label", 70, 15, 80, 12, "none", font12, true));
+		wndMessage.add(new gamegui.Button("button", 70, 115, 80, 30, "OK", font12));
+    }
+    
+    private void loadMap() {
+    	landMap = new HashMap<LandType, Land>();
+    	structMap = new HashMap<StructureType, Structure>();
+    	BufferedImage nullImg = null;
+    	
+    	try {
+    		girl = ImageIO.read(getClass().getResource("images/ArmoredGirl.png"));
+    		guy = ImageIO.read(getClass().getResource("images/ArmoredGuy.png"));
+    	}catch(IOException ioe) {
+    		ioe.printStackTrace();
+    	}
+    		
+    	landMap.put(LandType.Ocean, new Land(LandType.Ocean, "Ocean.png", false));
+    	landMap.put(LandType.Grass, new Land(LandType.Grass, "Grass.png", true));
+    	
+    	structMap.put(StructureType.None, new Structure(StructureType.None, nullImg, true));
+    	structMap.put(StructureType.BlueOrb, new Structure(StructureType.BlueOrb, "Blue Orb.png", false));
+    	structMap.put(StructureType.Cave, new Structure(StructureType.Cave, "Cave.png", false));
+    	structMap.put(StructureType.Gravestone, new Structure(StructureType.Gravestone, "Gravestone.png", false));
+    	structMap.put(StructureType.GraveyardFence1, new Structure(StructureType.GraveyardFence1, "HorGrave.png", false));
+    	structMap.put(StructureType.GraveyardFence2, new Structure(StructureType.GraveyardFence2, "VerGrave.png", false));
+    	structMap.put(StructureType.PicketFence1, new Structure(StructureType.PicketFence1, "HorPalisade.png", false));
+    	structMap.put(StructureType.PicketFence2, new Structure(StructureType.PicketFence2, "VerPalisade.png", false));
+    	structMap.put(StructureType.Hut, new Structure(StructureType.Hut, "Hut.png", false));
+    	structMap.put(StructureType.WitchHut, new Structure(StructureType.WitchHut, "Witch Hut.png", false));
+    	structMap.put(StructureType.Tent, new Structure(StructureType.Tent, "Tent.png", false));
+    	structMap.put(StructureType.LargeTent, new Structure(StructureType.LargeTent, "LargeTent.png", false));
+    	structMap.put(StructureType.House, new Structure(StructureType.House, "House.png", false));
+    	structMap.put(StructureType.Tree, new Structure(StructureType.Tree, "Trees.png", false));
+    	structMap.put(StructureType.BlueOrb, new Structure(StructureType.BlueOrb, "Blue Orb.png", false));
+    	structMap.put(StructureType.RedOrb, new Structure(StructureType.RedOrb, "Red Orb.png", false));
+    	structMap.put(StructureType.LoginPedestal, new Structure(StructureType.LoginPedestal, "YellowPedestal.png", true));
+    	structMap.put(StructureType.RejuvenationPedestal, new Structure(StructureType.RejuvenationPedestal, "PurplePedestal.png", true));
+    	structMap.put(StructureType.LifePedestal, new Structure(StructureType.LifePedestal, "RedPedestal.png", true));
+    	structMap.put(StructureType.ManaPedestal, new Structure(StructureType.ManaPedestal, "BluePedestal.png", true));
+    }
+    
+    private void move() {
+    	double dist = player.getSpeed()*(System.currentTimeMillis()-player.getLastMoved())/1000;
+    	Point lastLoc = player.getLoc();
+    	Point target = player.getTarget();
+    	Point newLoc;
+    	
+    	player.setLastMoved(System.currentTimeMillis());
+    	if(Point.dist(lastLoc, player.getTarget()) <= dist)
+    		player.setLoc(player.getTarget());
+    	else {
+    		int xDif = (int)(Point.xDif(lastLoc, target)*dist/Point.dist(lastLoc, target));
+    		int yDif = (int)(Point.yDif(lastLoc, target)*dist/Point.dist(lastLoc, target));
+    		newLoc = new Point(lastLoc.getX(), lastLoc.getXMin()+xDif, lastLoc.getY(), lastLoc.getYMin()+yDif);
+    		newLoc.setX(newLoc.getX()+newLoc.getXMin()/100);
+    		newLoc.setXMin(newLoc.getXMin()%100);
+    		newLoc.setY(newLoc.getY()+newLoc.getYMin()/100);
+    		newLoc.setYMin(newLoc.getYMin()%100);
+    		if(newLoc.getXMin()<0) {
+    			newLoc.setX(newLoc.getX()-1);
+    			newLoc.setXMin(newLoc.getXMin()+100);
+    		}else if(newLoc.getYMin()<0) {
+    			newLoc.setY(newLoc.getY()-1);
+    			newLoc.setYMin(newLoc.getYMin()+100);
+    		}
+    		if(map.getLoc(newLoc.getX()/100, newLoc.getY()/100).isPassable())
+    			player.setLoc(newLoc);
+    		else
+    			player.setTarget(player.getLoc());
+    	}
+    }
+    
+    private void render(Graphics g) {
+    	g.setColor(Color.black);
+        g.fillRect(0, 0, 800, 600);
+        
+        switch(gameState) {
+		case Main:
+			drawMain(g);
+			break;
+		case CreateAccount:
+			drawCreateAccount(g);
+			break;
+		case CreateClass:
+			drawCreateClass(g);
+			break;
+		case LoadGame:
+			drawLoadGame(g);
+			break;
+		case Info:
+			drawInfo(g);
+			break;
+		case Credits:
+			drawCredits(g);
+			break;
+		case Game:
+			calculateMapVertices();
+            drawMap(g);
+            drawItems(g);
+            drawCreatures(g);
+            drawChar(g);
+            drawStatDisplay(g);
+            drawChat(g);
+			break;
+		case GameMenu:
+			calculateMapVertices();
+            drawMap(g);
+            drawItems(g);
+            drawCreatures(g);
+            drawChar(g);
+            drawStatDisplay(g);
+            drawChat(g);
+            drawGameMenu(g);
+			break;
+		case GameInventory:
+			calculateMapVertices();
+            drawMap(g);
+            drawItems(g);
+            drawCreatures(g);
+            drawChar(g);
+            drawStatDisplay(g);
+            drawChat(g);
+            drawGameInventory(g);
+			break;
+		case GameStats:
+			calculateMapVertices();
+            drawMap(g);
+            drawItems(g);
+            drawCreatures(g);
+            drawChar(g);
+            drawStatDisplay(g);
+            drawChat(g);
+            drawGameStats(g);
+			break;
+		}
+        
+        switch(auxState) {
+		case None:
+			break;
+		case MsgBox:
+			wndMessage.draw(g);
+			break;
+		}
+    }
+    
+    public static String dateString() {
+		return new SimpleDateFormat("MM/dd/yyyy HH:mm:ss").format(new Date());
+	}
+    
+    public void showMessage(String text) {
+    	auxState = AuxState.MsgBox;
+    	((gamegui.Label)wndMessage.getMember("label")).setText(text);
+    }
+    
+    private void calculateMapVertices() {
+    
+    }
+    
+    private void drawMain(Graphics g) {
+    	wndMain.draw(g);
+    	
+    	g.setColor(Color.red);
+		g.drawRect(10, 100, 380, 490);
+		g.drawRect(410, 100, 380, 490);
+    }
+    
+    private void drawCreateAccount(Graphics g) {    	
+    	wndCreateAccount.draw(g);
+    }
+    
+    private void drawCreateClass(Graphics g) {
+    	wndChooseClass.draw(g);
+    }
+    
+    private void drawLoadGame(Graphics g) {
+    	Font tempFont = new Font("Arial", Font.PLAIN, 12);
+    	FontMetrics metrics = g.getFontMetrics(tempFont);
+    	
+    	g.setFont(tempFont);
+    	g.setColor(Color.green);
+    	g.drawString("There is not a whole lot here right now. You can click anywhere on the screen to get back to the main menu.", 0, metrics.getHeight());
+    }
+    
+    private void drawInfo(Graphics g) {
+    	Font tempFont = new Font("Arial", Font.PLAIN, 12);
+    	FontMetrics metrics = g.getFontMetrics(tempFont);
+    	
+    	g.setFont(tempFont);
+    	g.setColor(Color.green);
+    	g.drawString("There is not a whole lot here right now. You can click anywhere on the screen to get back to the main menu.", 0, metrics.getHeight());
+    }
+    
+    private void drawCredits(Graphics g) {
+    	Font tempFont = new Font("Arial", Font.PLAIN, 12);
+    	FontMetrics metrics = g.getFontMetrics(tempFont);
+    	
+    	g.setFont(tempFont);
+    	g.setColor(Color.green);
+    	g.drawString("There is not a whole lot here right now. You can click anywhere on the screen to get back to the main menu.", 0, metrics.getHeight());
+    }
+    
+    private void drawMap(Graphics g) {
+    	int locX = player.getLoc().getX();
+    	int locY = player.getLoc().getY();
+    	int xLow = locX/100-4;
+    	int xHigh = xLow+9;
+    	int yLow = locY/100-3;
+    	int yHigh = yLow+7;
+    	
+    	if(xLow<0)
+    		xLow = 0;
+    	if(xHigh>=map.getLength())
+    		xHigh = map.getLength()-1;
+    	if(yLow<0)
+    		yLow = 0;
+    	if(yHigh>=map.getHeight())
+    		yHigh = map.getHeight()-1;
+
+		for(int x=xLow; x<xHigh; x++) {
+			for(int y=yLow; y<yHigh; y++) {
+				g.drawImage(map.getLoc(x, y).getLand().getImg(), 400+x*100-locX, 300+y*100-locY, null);				
+				g.drawImage(map.getLoc(x, y).getStruct().getImg(), 400+x*100-locX, 300+y*100-locY, null);
+			}
+		}
+    }
+    
+    private void drawItems(Graphics g) {
+    
+    }
+    
+    private void drawCreatures(Graphics g) {
+    
+    }
+    
+    private void drawChar(Graphics g) {
+    	switch(player.getGender()) {
+		case Female:
+			g.drawImage(girl, 375, 200, null);
+			break;
+		case Male:
+			g.drawImage(guy, 375, 200, null);
+			break;
+		}
+    }
+    
+    private void drawStatDisplay(Graphics g) {
+    
+    }
+    
+    private void drawChat(Graphics g) {
+    
+    }
+    
+    private void drawGameMenu(Graphics g) {
+    
+    }
+    
+    private void drawGameInventory(Graphics g) {
+    
+    }
+    
+    private void drawGameStats(Graphics g) {
+    
+    }
+    
+    private void selectText(Textbox text) {
+    	if(selectedText != null)
+			selectedText.setSelected(false);
+		selectedText = text;
+		
+		if(text != null)
+			text.setSelected(true);
+    }
+    
+    private static DisplayMode getBestDisplayMode(GraphicsDevice device) {
+        for (int x = 0; x < BEST_DISPLAY_MODES.length; x++) {
+            DisplayMode[] modes = device.getDisplayModes();
+            for (int i = 0; i < modes.length; i++) {
+                if (modes[i].getWidth() == BEST_DISPLAY_MODES[x].getWidth()
+                   && modes[i].getHeight() == BEST_DISPLAY_MODES[x].getHeight()
+                   && modes[i].getBitDepth() == BEST_DISPLAY_MODES[x].getBitDepth()) 
+                {
+                    return BEST_DISPLAY_MODES[x];
+                }
+            }
+        }
+        return null;
+    }
+    
+    public static void chooseBestDisplayMode(GraphicsDevice device) {
+        DisplayMode best = getBestDisplayMode(device);
+        if (best != null) {
+            device.setDisplayMode(best);
+        }
+    }
+    
+    public void mousePressed(MouseEvent e) {
+    	switch(auxState) {
+		case None:
+			switch(gameState) {
+			case Main:				
+				if(wndMain.getMember("new game").isClicked(e.getX(),e.getY()))
+					gameState = GameState.CreateAccount;
+				else if(wndMain.getMember("load game").isClicked(e.getX(),e.getY()))
+					gameState = GameState.LoadGame;
+				else if(wndMain.getMember("game info").isClicked(e.getX(),e.getY()))
+					gameState = GameState.Info;
+				else if(wndMain.getMember("credits").isClicked(e.getX(),e.getY()))
+					gameState = GameState.Credits;
+				else if(wndMain.getMember("quit").isClicked(e.getX(),e.getY()))
+					done = true;
+				break;
+			case CreateAccount:
+				if(wndCreateAccount.getMember("user").isClicked(e.getX(),e.getY()))
+					selectText((Textbox)wndCreateAccount.getMember("user"));
+				else if(wndCreateAccount.getMember("choose class").isClicked(e.getX(),e.getY())) {
+					selectText(null);
+					gameState = GameState.CreateClass;
+				}else if(wndCreateAccount.getMember("create").isClicked(e.getX(),e.getY())) {
+					String user = ((Textbox)wndCreateAccount.getMember("user")).getText();
+					Gender gender = Gender.valueOf(rdgGenderSelection.getButton(rdgGenderSelection.getSelected()).getLabel());
+					
+					if(user.equals("")) {
+						showMessage("The username is empty");
+					}else if(gender == Gender.None) {
+						showMessage("No gender has been selected");
+					}else{
+						player = new Player(user, gender);
+						player.setSpeed(200);
+						player.setLoc(new Point(750, 860));
+						player.setTarget(player.getLoc());
+						gameState = GameState.Game;
+					}
+				}else if(wndCreateAccount.getMember("cancel").isClicked(e.getX(),e.getY())) {
+					selectText(null);
+					wndCreateAccount.clear();
+					wndChooseClass.clear();
+					gameState = GameState.Main;
+				}else if(wndCreateAccount.handleEvent(e)) {
+				}
+				break;
+			case CreateClass:
+				if(wndChooseClass.getMember("select").isClicked(e.getX(),e.getY())) {
+					gameState = GameState.CreateAccount;
+				}
+				else if(wndChooseClass.getMember("cancel").isClicked(e.getX(),e.getY())) {
+					gameState = GameState.CreateAccount;
+				}else if(wndChooseClass.handleEvent(e)) {
+				}
+				break;
+			case LoadGame:
+				gameState = GameState.Main;
+				break;
+			case Info:
+				gameState = GameState.Main;
+				break;
+			case Credits:
+				gameState = GameState.Main;
+				break;
+			case Game:
+				int newX = player.getLoc().getX()+e.getX()-400;
+				int newY = player.getLoc().getY()+e.getY()-300;
+				if(map.getLoc((int)(Math.floor(newX/100)), (int)(Math.floor(newY/100))).isPassable()) {
+					player.setTarget(new Point(newX, newY));
+					player.setLastMoved(System.currentTimeMillis());
+				}
+				break;
+			case GameMenu:
+				break;
+			case GameInventory:
+				break;
+			case GameStats:
+				break;
+			}
+			break;
+		case MsgBox:
+			if(wndMessage.getMember("button").isClicked(e.getX(), e.getY())) {
+				auxState = AuxState.None;
+			}
+			break;
+		}
+	}
+	
+	public void mouseReleased(MouseEvent e) {
+		
+	}
+	
+	public void mouseEntered(MouseEvent e) {
+
+	}
+	
+	public void mouseExited(MouseEvent e) {
+	    
+	}
+	
+	public void mouseClicked(MouseEvent e) {
+		
+	}
+ 
+	public void keyTyped(KeyEvent e) {
+		
+	}
+	
+	public void keyPressed(KeyEvent e) {
+		if(selectedText != null)
+			selectedText.handleEvent(e);
+		
+		if(e.getKeyCode() == KeyEvent.VK_ESCAPE) 
+			if(gameState == GameState.Game)
+				gameState = GameState.Main;
+			else
+				done = true;
+	}
+	
+	public void keyReleased(KeyEvent e) {
+	
+	}
+    
+	public static void main(String[] args) {
+		try {
+			PrintStream st = new PrintStream(new FileOutputStream("err.txt", true));
+			System.setErr(st);
+			System.setOut(st);
+			System.out.println("-----[ Session started on " + dateString() + " ]-----");
+			
+			GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
+			GraphicsDevice device = env.getDefaultScreenDevice();
+			new LostHavenRPG(device);
+        }
+		catch (Exception e) {
+			e.printStackTrace();
+        }
+		System.exit(0);
+	}
+}
Index: main/Map.java
===================================================================
--- main/Map.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
+++ main/Map.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
@@ -0,0 +1,78 @@
+package main;
+
+import java.io.*;
+import java.util.*;
+
+public class Map {
+	private Location[][] grid;
+	
+	public Map(int x, int y) {
+		grid = new Location[x][y];
+	}
+	
+	public Map(String landFile, String structFile, HashMap<LandType, Land> landMap, HashMap<StructureType, Structure> structMap) {
+		try {
+			int length, height, x, y;
+			String str, loc;
+			BufferedReader in = new BufferedReader(new FileReader(landFile));
+			
+			str = in.readLine();
+			length = Integer.parseInt(str.substring(0, str.indexOf("x")));
+			height = Integer.parseInt(str.substring(str.indexOf("x")+1));
+			grid = new Location[length][height];
+			
+			for(x=0; x<height; x++) {
+				str = in.readLine();
+				for(y=0; y<length; y++) {
+					if(str.indexOf(",") == -1)
+						loc = str;
+					else {
+						loc = str.substring(0, str.indexOf(","));
+						str = str.substring(str.indexOf(",")+1);
+					}
+					
+					if(loc.equals("o")) {
+						loc = "Ocean";
+					}else if(loc.equals("1")) {
+						loc = "Grass";
+					}
+					
+					grid[y][x] = new Location(landMap.get(LandType.valueOf(loc)), structMap.get(StructureType.None));
+				}
+			}
+			
+			in.close();
+			
+			in = new BufferedReader(new FileReader(structFile));
+			
+			while((loc = in.readLine()) != null) {
+				str = in.readLine();
+				x = Integer.valueOf(str.substring(0, str.indexOf(",")));
+				y = Integer.valueOf(str.substring(str.indexOf(",")+1));
+				
+				grid[x-1][y-1].setStruct(structMap.get(StructureType.valueOf(loc)));
+			}
+		} catch(IOException ioe) {
+			ioe.printStackTrace();
+		}
+	}
+	
+	public Location getLoc(int x, int y) {
+		return grid[x][y];
+	}
+	
+	public void setLoc(Location loc, int x, int y) {
+		grid[x][y] = loc;
+	}
+	
+	public int getLength() {
+		return grid.length;
+	}
+	
+	public int getHeight() {
+		if(grid.length>0)
+			return grid[0].length;
+		else
+			return 0;
+	}
+}
Index: main/MapElement.java
===================================================================
--- main/MapElement.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
+++ main/MapElement.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
@@ -0,0 +1,41 @@
+package main;
+
+import java.awt.image.*;
+import java.io.IOException;
+
+import javax.imageio.ImageIO;
+
+public class MapElement {
+	private BufferedImage img;
+	private boolean passable;
+	
+	public MapElement(BufferedImage img, boolean passable) {
+		this.img = img;
+		this.passable = passable;
+	}
+	
+	public MapElement(String imgFile, boolean passable) {
+		try {
+			img = ImageIO.read(getClass().getResource("images/"+imgFile));
+			this.passable = passable;
+		}catch(IOException ioe) {
+    		ioe.printStackTrace();
+    	}
+	}
+	
+	public BufferedImage getImg() {
+		return img;
+	}
+	
+	public boolean isPassable() {
+		return passable;
+	}
+	
+	public void setImg(BufferedImage img) {
+		this.img = img;
+	}
+	
+	public void setPassable(boolean passable) {
+		this.passable = passable;
+	}
+}
Index: main/Player.java
===================================================================
--- main/Player.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
+++ main/Player.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
@@ -0,0 +1,46 @@
+package main;
+
+public class Player extends Creature {
+	private Point target;
+	private int experience;
+	private int gold;
+	
+	public Player() {
+		super();
+		target = new Point(0, 0);
+	}
+
+	public Player(String name) {
+		super(name);
+		target = new Point(0, 0);
+	}
+	
+	public Player(String name, Gender gender) {
+		super(name, gender);
+		target = new Point(0, 0);
+	}
+	
+	public int getExperience() {
+		return experience;
+	}
+	
+	public int getGold() {
+		return gold;
+	}
+	
+	public Point getTarget() {
+		return target;
+	}
+	
+	public void setExperience(int experience) {
+		this.experience = experience;
+	}
+	
+	public void setGold(int gold) {
+		this.gold = gold;
+	}
+	
+	public void setTarget(Point target) {
+		this.target = target;
+	}
+}
Index: main/Point.java
===================================================================
--- main/Point.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
+++ main/Point.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
@@ -0,0 +1,75 @@
+package main;
+
+public class Point {
+	private int x;
+	private int xMin;
+	private int y;
+	private int yMin;
+	
+	public Point() {
+		x = 0;
+		y = 0;
+	}
+
+	public Point(int x, int y) {
+		this.x = x;
+		this.xMin = 0;
+		this.y = y;
+		this.yMin = 0;
+	}
+	
+	public Point(int x, int xMin, int y, int yMin) {
+		this.x = x;
+		this.xMin = xMin;
+		this.y = y;
+		this.yMin = yMin;
+	}
+
+	public int getX() {
+		return x;
+	}
+	
+	public int getXMin() {
+		return xMin;
+	}
+
+	public int getY() {
+		return y;
+	}
+	
+	public int getYMin() {
+		return yMin;
+	}
+
+	public void setX(int x) {
+		this.x = x;
+	}
+	
+	public void setXMin(int xMin) {
+		this.xMin = xMin;
+	}
+
+	public void setY(int y) {
+		this.y = y;
+	}
+	
+	public void setYMin(int yMin) {
+		this.yMin = yMin;
+	}
+	
+	public String toString() {
+		return x+","+y;
+	}
+	
+	public static int xDif(Point p1, Point p2) {
+		return 100*(p2.x-p1.x)+p2.xMin-p1.xMin;
+	}
+	
+	public static int yDif(Point p1, Point p2) {
+		return 100*(p2.y-p1.y)+p2.yMin-p1.yMin;
+	}
+	
+	public static double dist(Point p1, Point p2) {
+		return Math.sqrt(Math.pow(p1.x+p1.xMin/100-p2.x-p2.xMin/100, 2)+Math.pow(p1.y+p1.yMin/100-p2.y-p2.yMin/100, 2));
+	}
+}
Index: main/SpawnPoint.java
===================================================================
--- main/SpawnPoint.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
+++ main/SpawnPoint.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
@@ -0,0 +1,25 @@
+package main;
+
+public class SpawnPoint {
+	Point loc;
+	long lastSpawned;
+	long interval;
+	Creature creature;
+	
+	public SpawnPoint(Point loc, long interval, Creature creature) {
+		this.loc = loc;
+		this.interval = interval;
+		this.creature = creature;
+		lastSpawned = 0;
+	}
+	
+	//calling class handles the actual spawning of the creature if this method returns true
+	public boolean spawn() {
+		if((System.currentTimeMillis()-lastSpawned) >= interval) {
+			lastSpawned = System.currentTimeMillis();
+			return true;
+		}else {
+			return false;
+		}
+	}
+}
Index: main/Structure.java
===================================================================
--- main/Structure.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
+++ main/Structure.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
@@ -0,0 +1,23 @@
+package main;
+
+import java.awt.image.*;
+
+public class Structure extends MapElement {
+	private StructureType type;
+	
+	public Structure(StructureType type, BufferedImage img, boolean passable) {
+		super(img, passable);
+		
+		this.type = type;
+	}
+	
+	public Structure(StructureType type, String imgFile, boolean passable) {
+		super(imgFile, passable);
+		
+		this.type = type;
+	}
+	
+	public StructureType getType() {
+		return type;
+	}
+}
Index: main/StructureType.java
===================================================================
--- main/StructureType.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
+++ main/StructureType.java	(revision 08704682fb409c42246c2544c64a8681a3fd9734)
@@ -0,0 +1,23 @@
+package main;
+
+public enum StructureType {
+    None,
+    Tent,
+    LargeTent,
+    House,
+    Cave,
+    Gravestone,
+    GraveyardFence1,
+    GraveyardFence2,
+    PicketFence1,
+    PicketFence2,
+    Hut,
+    WitchHut,
+    Tree,
+    BlueOrb,
+    RedOrb,
+    LoginPedestal,
+    RejuvenationPedestal,
+    LifePedestal,
+    ManaPedestal
+}
