package zuul;

import java.io.IOException;

import View.ThreeDView;
import View.View;

/**
 * This class is the main class of the "World of Zuul" application.
 * "World of Zuul" is a very simple, text based adventure game. Users can walk
 * around some scenery. That's all. It should really be extended to make it more
 * interesting! To play this game, invoke the static main method with no string
 * parameters. This main class creates and initialises all the others: it
 * creates all rooms, creates the parser and starts the game. It also evaluates
 * and executes the commands that the parser returns.
 * 
 * @author Vinayak Bansal
 * @version 2012.10.22
 */

public class Game {

  /**
   * Initialization method, to set up the game. Sets up the rooms, the monsters
   * and the items in the game.
   */
  public static Room initialize() {
    Room startRoom = new Room("StartRoom");
    Room northRoom1 = new Room("NorthRoom1");
    northRoom1.addItem(new Item("Bread", 30, 0, false));
    Room southRoom = new Room("SouthRoom");
    Room eastRoom = new Room("EastRoom");
    Room westRoom = new Room("WestRoom");
    Room northWestRoom = new Room("NorthWestRoom");
    Room northRoom2 = new Room("NorthRoom2");
    startRoom.addItem(new Item("Sword", 50, 0, true));
    startRoom.setExit(Direction.NORTH, northRoom1);
    startRoom.setExit(Direction.SOUTH, southRoom);
    startRoom.setExit(Direction.EAST, eastRoom);
    startRoom.setExit(Direction.WEST, westRoom);
    westRoom.addItem(new Item("Apple", 10, 0, false));
    westRoom.addItem(new Item("Orange", 15, 0, false));
    westRoom.addItem(new Item("Pear", 20, 0, false));

    eastRoom.setExit(Direction.WEST, startRoom);

    Monster alien = new Monster(Humanoid.MAX_HEALTH, Monster.DEFAULT_LEVEL,
        "Alien", eastRoom);
    eastRoom.addMonster(alien);
    alien.addItem(new Item("Map", 0, 0, true));
    alien.addItem(new Item("Claws", 10, 0, true));

    Monster boss = new Monster(100, 2, "Boss", southRoom);
    southRoom.addMonster(boss);
    boss.addItem(new Item("Flamethrower", 30, 0, true));
    boss.addItem(new Item("Key", 0, 0, true));

    westRoom.setExit(Direction.EAST, startRoom);
    northRoom1.setExit(Direction.SOUTH, startRoom);
    northRoom1.setExit(Direction.NORTH, northRoom2);
    southRoom.setExit(Direction.NORTH, startRoom);

    northRoom2.setExit(Direction.SOUTH, northRoom1);
    northRoom2.setExit(Direction.WEST, northWestRoom);
    northWestRoom.setExit(Direction.EAST, northRoom2);
    northWestRoom.setLocked(true);
    northWestRoom.addItem(new Item("Treasure", 100, 0, true));

    return startRoom;
  }

  public static void main(String[] args) throws IOException {

    View view = new ThreeDView();
    view.update();
    view.setVisible(true);

  }

}

@@ -48,18 +48,73 @@
 ort 
-View.Three
+javax.swing.JOptionPane;%0A%0Aimport View.ThreeDView;%0Aimport View.Two
 DVie
@@ -2732,17 +2732,330 @@
 n %7B%0A
-%0A    View
+%09  String%5B%5D s = new String%5B2%5D;%0A%09  s%5B0%5D = %222D%22;%0A%09  s%5B1%5D = %223D%22;%0A%09  int popup = JOptionPane.showOptionDialog(null, %22Choose one:%22,%0A          %22Current Room%22, JOptionPane.YES_NO_CANCEL_OPTION,%0A          JOptionPane.INFORMATION_MESSAGE, null, s, null);%0A%09  View view;%0A%09  if(popup == 0)%7B%0A%09%09  view = new TwoDView();%0A%09  %7D else %7B%0A%09%09 
  vie
@@ -3072,24 +3072,31 @@
 reeDView();%0A
+%09  %7D%0A  
     view.upd
@@ -3102,16 +3102,18 @@
 date();%0A
+  
     view

Add option to choose between 2D and 3D views.