package nl.yacht.lakesideresort.controller.gui;

import nl.yacht.lakesideresort.domain.Boat;

import java.io.IOException;

/**
 * Created by njvan on 11-Oct-17.
 */
@Gui(name="Room")
public class RoomGui extends Command {
    public void create() throws IOException {
        String[][] definition = {
            {"What type of room is it [Normal, Luxury]?","NORMAL|LUXURY"},
            {"How big is the room [Normal, Big]?","NORMAL|BIG"},
            {"How many windows?","\\d+"}
        };
        Object[] inputs = InputHandler.handleInput(definition, args);
        Boat boat = new Boat(Integer.parseInt(inputs[2].toString()));
        System.out.println(boat.getNumber());
    }

    public void find() {
        System.out.print("What is the room number? ");
    }

    public void doSomething(){
        System.out.println("Doing something!");
    }
}

@@ -85,16 +85,60 @@
 in.Boat;
+%0Aimport nl.yacht.lakesideresort.domain.Room;
 %0A%0Aimport
@@ -378,16 +378,24 @@
  is it %5B
+Budget, 
 Normal, 
@@ -401,24 +401,31 @@
  Luxury%5D?%22,%22
+BUDGET%7C
 NORMAL%7CLUXUR
@@ -447,15 +447,17 @@
   %7B%22
-How big
+What size
  is 
@@ -470,38 +470,46 @@
 om %5B
-Normal, Big%5D?%22,%22NORMAL%7CBIG%22%7D,%0A
+1, 2, 3-4, 5-6%5D?%22,%221%7C2%7C3-4%7C5-6%22%7D,%0A    
     
@@ -626,16 +626,922 @@
  args);%0A
+        // checken%0A        Room.RoomSize roomSize;%0A        Room.RoomType roomType;%0A        switch(inputs%5B0%5D.toString())%7B%0A            case %22LUXURY%22:%0A                roomType = Room.RoomType.LUXURY;%0A                break;%0A            case %22BUDGET%22:%0A                roomType = Room.RoomType.BUDGET;%0A                break;%0A            case %22NORMAL%22:%0A                roomType = Room.RoomType.NORMAL;%0A                break;%0A        %7D%0A%0A        String s = inputs%5B1%5D.toString();%0A        switch(s)%7B%0A            case %221%22:%0A                roomSize = Room.RoomSize.ONE_PERSON;%0A            break;%0A%0A            case %222%22:%0A                roomSize = Room.RoomSize.TWO_PERSON;%0A                break;%0A%0A            case %223-4%22:%0A                roomSize = Room.RoomSize.THREE_FOUR_PERSON;%0A                break;%0A%0A            case %225-6%22:%0A                roomSize = Room.RoomSize.FIVE_SIX_PERSON;%0A                break;%0A        %7D%0A
         

Implement room GUI