package org.academiadecodigo.bootcamp11.arabiannights;

/**
 * MIT License
 * (c) 2017 Ricardo Constantino
 */

public class Main {
    public static void main(String[] args) {
        // create protagonist
        Alladin francisco = new Alladin("Francisco");

        // create lamps on the floor
        MagicLamp[] lamps = {
                // each lamp pre-initiates the genies inside to a pre-determined max
                new MagicLamp(2),
                new MagicLamp(2)
        };

        // introduce the protagonist to the lamps
        francisco.introduction(lamps);

        // rub the lamp
        francisco.rubOneOut();

        // make a wish to the current genie
        francisco.makeAwish();
        francisco.makeAwish();
        francisco.makeAwish();
        francisco.throwLampAway();

        francisco.rubOneOut();
        francisco.makeAwish();
        francisco.makeAwish();

        francisco.rubOneOut();
        francisco.makeAwish();
        francisco.makeAwish();

        francisco.rubOneOut();
        francisco.makeAwish();
        francisco.pushGenieIntoLamp();

        francisco.compareLamps();

        francisco.rubOneOut();
        francisco.makeAwish();

        francisco.throwLampAway();
        francisco.rubOneOut();
        francisco.makeAwish();
    }
}
