#include "ParkingTower.h"
#include "Car.h"
#include "Motorcycle.h"
#include "Van.h"

void failMessage1(Vehicle *v)
{
// ...
}

void failMessage2(Vehicle *v)
{
// ...
}

int main()
{
    ParkingTower parkingTower(2,3,6);
    int i;

    Car cars[17];
    Motorcycle bikes[18];
    Van vans[10];

    for (i=0; i<5; i++) 
        if (!parkingTower.park(&cars[i])) failMessage1(&cars[i]);
    for (i=0; i<10; i++) 
        if (!parkingTower.park(&bikes[i])) failMessage1(&bikes[i]);
    for (i=0; i<5; i++)
        if (!parkingTower.park(&vans[i])) failMessage1(&vans[i]);
    for (i=5; i<16; i++) 
        if (!parkingTower.park(&cars[i])) failMessage1(&cars[i]);
    if (!parkingTower.pickup(&vans[1])) failMessage2(&vans[1]);
    if (!parkingTower.pickup(&cars[12])) failMessage2(&cars[12]);
    for (i=10; i<18; i++) 
        if (!parkingTower.park(&bikes[i])) failMessage1(&bikes[i]);
    for (i=16; i<17; i++) 
        if (!parkingTower.park(&cars[i])) failMessage1(&cars[i]);
    for (i=5; i<10; i++)
        if (!parkingTower.park(&vans[i])) failMessage1(&vans[i]);
    if (!parkingTower.pickup(&cars[12])) failMessage2(&cars[12]);

    return 0;
}

/*

       Car:   0 parks at floor:0  row:0  PSnum:  3  size:Compact
       Car:   1 parks at floor:0  row:0  PSnum:  4  size:Compact
       Car:   2 parks at floor:0  row:0  PSnum:  5  size:Compact
       Car:   3 parks at floor:0  row:1  PSnum:  6  size:Compact
       Car:   4 parks at floor:0  row:1  PSnum:  7  size:Compact
Motorcycle:  17 parks at floor:0  row:0  PSnum:  0  size:Bike
Motorcycle:  18 parks at floor:0  row:0  PSnum:  1  size:Bike
Motorcycle:  19 parks at floor:0  row:0  PSnum:  2  size:Bike
Motorcycle:  20 parks at floor:0  row:1  PSnum:  8  size:Compact
Motorcycle:  21 parks at floor:0  row:1  PSnum:  9  size:Compact
Motorcycle:  22 parks at floor:0  row:1  PSnum: 10  size:Compact
Motorcycle:  23 parks at floor:0  row:1  PSnum: 11  size:Compact
Motorcycle:  24 parks at floor:0  row:2  PSnum: 12  size:Compact
Motorcycle:  25 parks at floor:0  row:2  PSnum: 13  size:Compact
Motorcycle:  26 parks at floor:0  row:2  PSnum: 14  size:Large
       Van:  35 parks at floor:0  row:2  PSnum: 15  size:Large
       Van:  35 parks at floor:0  row:2  PSnum: 16  size:Large
       Van:  36 parks at floor:1  row:2  PSnum: 14  size:Large
       Van:  36 parks at floor:1  row:2  PSnum: 15  size:Large
       Van:  37 parks at floor:1  row:2  PSnum: 16  size:Large
       Van:  37 parks at floor:1  row:2  PSnum: 17  size:Large
       Van:  38 failed to park!
       Van:  39 failed to park!
       Car:   5 parks at floor:0  row:2  PSnum: 17  size:Large
       Car:   6 parks at floor:1  row:0  PSnum:  3  size:Compact
       Car:   7 parks at floor:1  row:0  PSnum:  4  size:Compact
       Car:   8 parks at floor:1  row:0  PSnum:  5  size:Compact
       Car:   9 parks at floor:1  row:1  PSnum:  6  size:Compact
       Car:  10 parks at floor:1  row:1  PSnum:  7  size:Compact
       Car:  11 parks at floor:1  row:1  PSnum:  8  size:Compact
       Car:  12 parks at floor:1  row:1  PSnum:  9  size:Compact
       Car:  13 parks at floor:1  row:1  PSnum: 10  size:Compact
       Car:  14 parks at floor:1  row:1  PSnum: 11  size:Compact
       Car:  15 parks at floor:1  row:2  PSnum: 12  size:Compact
       Van:  36 picked up from floor:1  row:2  PSnum: 14  size:Large
                               floor:1  row:2  PSnum: 15  size:Large
       Car:  12 picked up from floor:1  row:1  PSnum:  9  size:Compact
Motorcycle:  27 parks at floor:1  row:0  PSnum:  0  size:Bike
Motorcycle:  28 parks at floor:1  row:0  PSnum:  1  size:Bike
Motorcycle:  29 parks at floor:1  row:0  PSnum:  2  size:Bike
Motorcycle:  30 parks at floor:1  row:1  PSnum:  9  size:Compact
Motorcycle:  31 parks at floor:1  row:2  PSnum: 13  size:Compact
Motorcycle:  32 parks at floor:1  row:2  PSnum: 14  size:Large
Motorcycle:  33 parks at floor:1  row:2  PSnum: 15  size:Large
Motorcycle:  34 failed to park!
       Car:  16 failed to park!
       Van:  40 failed to park!
       Van:  41 failed to park!
       Van:  42 failed to park!
       Van:  43 failed to park!
       Van:  44 failed to park!
       Car:  12 failed at picking up!

*/
