public static void main(String[] args){
    	int load;
    	Object[] options = {"Text-Based",
                "Visual Text-Based",
                "2D Game", 
                "Game Editor"};
    	
    	Object viewOption = JOptionPane.showInputDialog(null,
				"Welcome to the World of Nameless\nWhich version of the game would you like to play? ",
				"Game Mode Selection",
				JOptionPane.QUESTION_MESSAGE,
				null,
				options,
				options[2]);
    	

    	
    	
    	if(viewOption!=null) {
        	View view ;
	    	
	    	if(viewOption.equals(options[0])) { // Text-Based Option
	    		view =  new ViewText();
	    	}
	    	else if (viewOption.equals(options[1])) { // 2D option
	    		view = new ViewMapD();
	    	}
	    	else if (viewOption.equals(options[2])) {
	    		view = new View2D();
	    	}
	    	else {
	    		startLevelEditor();
	    		
	    		return;
	    	}
	    	
	    	load = JOptionPane.showConfirmDialog(null, "Do you want to load the previous game?", "load", JOptionPane.YES_NO_OPTION);

	    	LevelLoader loader=new LevelLoader();
	    	Game game = null;
	    	if(load != 0){
	    		game=new Game();
				try {
					Player player=loader.LoadLevel(fileName);
					game.setPlayer(player);
				} catch (Exception e) {
					e.printStackTrace();
				}
	    	}
	    	else{
	    		try {
					game = Game.load();
				} catch (Exception e) {
					JOptionPane.showMessageDialog(null, "Could not load the save file", "Could not load", JOptionPane.ERROR_MESSAGE);
					view.dispose();
					return;
				}
	    	}
	    	
	    	CommandInterpreter c = new CommandInterpreter(view, game);
	
	    	game.addModelListeners((ModelListener)view);
	    	c.play();
	    	view.dispose();
    	}
    }