Index: src/com/medievaltech/advancewars/Game.java
===================================================================
--- src/com/medievaltech/advancewars/Game.java	(revision b97a61801c2efdfad66c28c6dcde99b537243f98)
+++ src/com/medievaltech/advancewars/Game.java	(revision 113d7cfbe433bf0f295c897fe301c6e7b1c3cf4e)
@@ -1,6 +1,6 @@
 package com.medievaltech.advancewars;
 
-import com.medievaltech.advancewars.R;
-import com.medievaltech.advancewars.GameView;
+import java.io.*;
+
 import com.medievaltech.advancewars.GameView.DrawingThread;
 
@@ -14,6 +14,7 @@
 
 public class Game extends Activity {
-    private static final int MENU_EXIT = 1;
-    private static final int MENU_NEW = 2;
+	private static final int MENU_SAVE = 1;
+	private static final int MENU_MAIN = 2;
+    private static final int MENU_EXIT = 3;
     
     public enum State{BUST, ACTIVE, DOUBLEDOWN};
@@ -35,4 +36,6 @@
         super.onCreateOptionsMenu(menu);
 
+        menu.add(0, MENU_SAVE, 0, R.string.menu_save);
+        menu.add(0, MENU_MAIN, 0, R.string.menu_main);
         menu.add(0, MENU_EXIT, 0, R.string.menu_exit);
         return true;
@@ -49,6 +52,18 @@
     public boolean onOptionsItemSelected(MenuItem item) {
         switch (item.getItemId()) {
+        	case MENU_SAVE:
+        		try {
+        			PrintWriter p = new PrintWriter(new FileWriter(android.os.Environment.getExternalStorageDirectory()+"/save.txt"));
+        			mThread.mMap.save(p);
+        			p.close();
+        		}catch(IOException ioe) {
+        			ioe.printStackTrace();
+        		}
+    			break;
+        	case MENU_MAIN:
+        		mThread.mGameState = GameState.MAIN_MENU;
+        		break;
             case MENU_EXIT:
-            	this.finish();
+            	finish();
             	break;
         }
@@ -93,7 +108,4 @@
             
             mGameView.getThread().mGameState = (GameState)savedInstanceState.getSerializable("gameState");
-            
-		    mGameView.getThread().mPlayerWins = savedInstanceState.getInt("playerWins");
-		    mGameView.getThread().mPlayerLosses = savedInstanceState.getInt("playerLosses");
         }
     }
@@ -117,9 +129,7 @@
     protected void onSaveInstanceState(Bundle outState) {
     	outState.putSerializable("gameState", mGameView.getThread().mGameState);
-	    outState.putSerializable("playerWins", mGameView.getThread().mPlayerWins);
-	    outState.putSerializable("playerLosses", mGameView.getThread().mPlayerLosses);
-	    
+    	
         super.onSaveInstanceState(outState);
-        Log.w("Blackjack", "onSaveInstanceState called");
+        Log.w("AdvanceWars", "onSaveInstanceState called");
     }
     
Index: src/com/medievaltech/advancewars/GameView.java
===================================================================
--- src/com/medievaltech/advancewars/GameView.java	(revision b97a61801c2efdfad66c28c6dcde99b537243f98)
+++ src/com/medievaltech/advancewars/GameView.java	(revision 113d7cfbe433bf0f295c897fe301c6e7b1c3cf4e)
@@ -1,5 +1,8 @@
 package com.medievaltech.advancewars;
 
-import com.medievaltech.game.*;
+import java.io.*;
+
+import com.medievaltech.advancewars.Tile.TerrainType;
+import com.medievaltech.unit.*;
 import com.medievaltech.gui.*;
 
@@ -12,13 +15,4 @@
 import android.widget.TextView;
 
-/**
- * View that draws, takes keystrokes, etc. for a simple LunarLander game.
- * 
- * Has a mode which RUNNING, PAUSED, etc. Has a x, y, dx, dy, ... capturing the
- * current ship physics. All x/y etc. are measured with (0,0) at the lower left.
- * updatePhysics() advances the physics based on realtime. draw() renders the
- * ship, and does an invalidate() to prompt another draw() as soon as possible
- * by the system.
- */
 class GameView extends SurfaceView implements SurfaceHolder.Callback {
 	
@@ -39,5 +33,4 @@
         private int mCanvasHeight = 1;
         private int mCanvasWidth = 1;
-        public int mPlayerWins = 0, mPlayerLosses = 0;
 
         /** Message handler used by thread to interact with TextView */
@@ -51,5 +44,8 @@
         	mUnitPaint;
         
-        private Map mMap;
+        //maybe make this private and make an accessor for it
+        public Map mMap;
+        
+        public Tile grassTile, oceanTile;
 
         /** Indicate whether the surface has been created & is ready to draw */
@@ -59,5 +55,5 @@
         private SurfaceHolder mSurfaceHolder;
         
-        private com.medievaltech.gui.Window wndMainMenu, wndBattleMap;
+        private com.medievaltech.gui.Window wndMainMenu;
         private Unit selectedUnit;
         
@@ -66,5 +62,4 @@
             mSurfaceHolder = surfaceHolder;
             mHandler = handler;
-            mContext = context;
             
             mLinePaint = new Paint();
@@ -107,6 +102,6 @@
             wndMainMenu.addGUIObject("btnQuit", new Button("Quit", 100, 195, 120, 20, mLinePaint, mButtonPaint));
             
-            Tile grassTile = new Tile(mTilePaint1);
-            Tile oceanTile = new Tile(mTilePaint2);
+            grassTile = new Tile(mTilePaint1, TerrainType.LAND);
+            oceanTile = new Tile(mTilePaint2, TerrainType.SEA);
             
             mMap = new Map(grassTile, 6, 8, new Point(10, 25));
@@ -336,7 +331,4 @@
         private void doDraw(Canvas canvas) {
         	canvas.drawColor(Color.BLACK);
-        	
-        	String text;
-        	Paint.FontMetrics metrics = mTextPaint.getFontMetrics();
         	
         	switch(mGameState) {
@@ -380,7 +372,4 @@
     }
 
-    /** Handle to the application context, used to e.g. fetch Drawables. */
-    private Context mContext;
-
     /** Pointer to the text view to display "Paused.." etc. */
     private TextView mStatusText;
@@ -421,4 +410,46 @@
     				thread.mGameState = GameState.BATTLE_MAP;
     			}else if(thread.wndMainMenu.getGUIObject("btnLoadGame").isClicked(event.getX(), event.getY())) {
+    				BufferedReader b;
+            		try {
+            			b = new BufferedReader(new FileReader(android.os.Environment.getExternalStorageDirectory()+"/save.txt"));
+            			
+            			int width = Integer.parseInt(b.readLine());
+            			int height = Integer.parseInt(b.readLine());
+            			
+            			String offset = b.readLine();
+            			Log.i("GameSave", offset);
+            			int offsetX = Integer.parseInt(offset.substring(0, offset.indexOf("x")));
+            			int offsetY = Integer.parseInt(offset.substring(offset.indexOf("x")+1));
+            			
+            			thread.mMap = new Map(thread.grassTile, width, height, new Point(offsetX, offsetY));
+            			
+            			Log.i("GameSave", "Created the map");
+            			
+            			for(int x=0; x<width; x++) {
+            				String line = b.readLine();
+            				Log.i("GameSave", line);
+            				String[] arr = line.split(",");
+            				for(int y=0; y<arr.length; y++) {
+            					TerrainType type = TerrainType.values()[Integer.parseInt(arr[y])];
+            					if(type.equals(TerrainType.LAND))
+                					thread.mMap.setTile(x, y, new Tile(thread.grassTile, new Point(10, 25)));
+                				else
+                					thread.mMap.setTile(x, y, new Tile(thread.oceanTile, new Point(10, 25)));
+            				}
+            			}
+            			
+            			while(b.ready()) {
+            				String unit = b.readLine();
+            				Log.i("GameSave", unit);
+            				int x = Integer.parseInt(unit.substring(0, unit.indexOf(",")));
+                			int y = Integer.parseInt(unit.substring(unit.indexOf(",")+1));
+            				
+            				mGame.mThread.mMap.getTile(x, y).addUnit(new Soldier(mGame.mThread.mUnitPaint));
+            			}
+            			
+            			b.close();
+            		}catch(IOException ioe) {
+            			ioe.printStackTrace();
+            		}
     				thread.mGameState = GameState.BATTLE_MAP;
     			}else if(thread.wndMainMenu.getGUIObject("btnQuit").isClicked(event.getX(), event.getY())) {
Index: src/com/medievaltech/advancewars/Map.java
===================================================================
--- src/com/medievaltech/advancewars/Map.java	(revision 113d7cfbe433bf0f295c897fe301c6e7b1c3cf4e)
+++ src/com/medievaltech/advancewars/Map.java	(revision 113d7cfbe433bf0f295c897fe301c6e7b1c3cf4e)
@@ -0,0 +1,82 @@
+package com.medievaltech.advancewars;
+
+import java.io.*;
+
+import com.medievaltech.unit.Unit;
+
+
+import android.graphics.*;
+
+public class Map {
+	private Tile[][] grid;
+	public Point offset;
+	
+	public Map(int width, int height, Point offset) {
+		grid = new Tile[width][height];
+		this.offset = offset;
+	}
+	
+	public Map(Tile t, int width, int height, Point offset) {
+		grid = new Tile[width][height];
+		this.offset = offset;
+		
+		for(int x=0; x<getWidth(); x++)
+			for(int y=0; y<getHeight(); y++)
+				grid[x][y] = new Tile(t, new Point(x, y));
+	}
+	
+	public int getWidth() {
+		return grid.length;
+	}
+	
+	public int getHeight() {
+		return grid[0].length;
+	}
+	
+	public Tile getTile(int x, int y) {
+		return grid[x][y];
+	}
+	
+	public Tile getTile(Point point) {
+		return grid[point.x][point.y];
+	}
+	
+	public void setTile(int x, int y, Tile t) {
+		grid[x][y] = t;
+	}
+	
+	public void save(PrintWriter p) {
+		p.println(getWidth());
+		p.println(getHeight());
+		p.println(offset.x+"x"+offset.y);
+		
+		for(int x=0; x<getWidth(); x++) {
+			p.print(grid[x][0].type.ordinal());
+			for(int y=1; y<getHeight(); y++)
+				p.print(","+grid[x][y].type.ordinal());
+			p.println();
+		}
+		
+		for(int x=0; x<getWidth(); x++) {
+			for(int y=1; y<getHeight(); y++) {
+				if(grid[x][y].currentUnit != null) {
+					Unit u = grid[x][y].currentUnit;
+					//p.println(u.type);
+					p.println(u.location.x+","+u.location.y);
+				}
+			}
+		}
+	}
+	
+	public void draw(Canvas c) {
+		for(int x=0; x<getWidth(); x++)
+			for(int y=0; y<getHeight(); y++)
+				grid[x][y].draw(c, offset.x+50*x, offset.y+50*y);
+	}
+	
+	public void drawUnits(Canvas c) {
+		for(int x=0; x<getWidth(); x++)
+			for(int y=0; y<getHeight(); y++)
+				grid[x][y].drawUnit(c, offset.x+50*x, offset.y+50*y);
+	}
+}
Index: src/com/medievaltech/advancewars/Tile.java
===================================================================
--- src/com/medievaltech/advancewars/Tile.java	(revision 113d7cfbe433bf0f295c897fe301c6e7b1c3cf4e)
+++ src/com/medievaltech/advancewars/Tile.java	(revision 113d7cfbe433bf0f295c897fe301c6e7b1c3cf4e)
@@ -0,0 +1,54 @@
+package com.medievaltech.advancewars;
+
+import com.medievaltech.unit.Unit;
+
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.graphics.Point;
+
+public class Tile {
+	public enum TerrainType
+	{
+		LAND, SEA
+	}
+	
+	TerrainType type;
+	public double moveCoefficent;
+	public Unit currentUnit;
+	public Point point;
+	private Paint p;
+	
+	public Tile(Paint p, TerrainType type) {
+		this.p = p;
+		this.type = type;
+		this.currentUnit = null;
+	}
+	
+	public Tile(Tile t, Point point) {
+		this.type = t.type;
+		this.moveCoefficent = t.moveCoefficent;
+		this.p = t.p;
+		this.point = point;
+	}
+	
+	public void addUnit(Unit unit) {
+		currentUnit = unit;
+		unit.location = point;
+	}
+	
+	public void removeUnit(Unit unit) {
+		if(currentUnit != null) {
+			currentUnit = null;
+		}
+	
+	}
+	
+	public void draw(Canvas c, int x, int y) {
+		c.drawRect(x, y, x+50, y+50, p);
+	}
+	
+	public void drawUnit(Canvas c, int x, int y) {
+		if(currentUnit != null)
+			currentUnit.draw(c, x+25, y+25);
+	}
+}
