-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAIPROJECT.cpp
38 lines (30 loc) · 1015 Bytes
/
AIPROJECT.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <iostream>
#include "Parking.h"
int main() {
std::cout << "Hello World3!\n";
//0 -->Obstacle 1-->Free 2-->Car
Parking parking = Parking(4, 3); // Create Parking object with width = 3, height = 4
// Iterate over the cells and print their values
Car car1= Car(1,1,"left");
Car car2= Car(1,2,"forward");
Car car3= Car(0,2,"right");
parking.addCar(car1);
parking.addCar(car2);
parking.addCar(car3);
parking.setObstacle(1,0);
parking.setObstacle(2,2);
parking.setObstacle(0,3);
for (int i = 0; i < parking.getHeight(); ++i) {
for (int j = 0; j < parking.getWidth(); ++j) {
std::cout << parking.getCell(i, j) << " ";
}
std::cout << std::endl;
}
//setCars ++
// std::cout << parking.getCars().at(0).getX();
// std::cout <<parking.moveCarUp(0,parking.getCars())<< std::endl;
//parking.moveCarUp(0,parking.getCars());
//std::cout << std::endl;
std::cout << parking.expand(2).at(0)<<"<--";
return 0;
}