Browse Source

main.cpp edited online with Bitbucket

Jose R Ortiz Ubarri 8 years ago
parent
commit
a721fff93c
1 changed files with 0 additions and 27 deletions
  1. 0
    27
      main.cpp

+ 0
- 27
main.cpp View File

13
 
13
 
14
     w->show();
14
     w->show();
15
 
15
 
16
-    while (w->canMove('W'))
17
-        w->moveRobot('W');
18
-
19
-
20
-    while (w->canMove('N'))
21
-        w->moveRobot('N');
22
-    //w->moveRobot('N');
23
-
24
-    int width = 1;
25
-    w->display(width);
26
-    while (w->canMove('E')) {
27
-        width++;
28
-        w->moveRobot('E');
29
-        w->display(width);
30
-    }
31
-
32
-
33
-    int height = 1;
34
-    w->display(height);
35
-    while (w->canMove('S')) {
36
-        height++;
37
-        w->moveRobot('S');
38
-        w->display(height);
39
-    }
40
-
41
-    w->display("Total: " + QString::number(width * height));
42
-    w->moveRobot('J');
43
 
16
 
44
     return a.exec();
17
     return a.exec();
45
 }
18
 }