|
29 | 29 | //programs additional time to initialize. Actions are taken beginning
|
30 | 30 | //at window load time. Note that all actions are padded with a .1 sec
|
31 | 31 | //delay.
|
32 |
| - "delay 1", |
| 32 | + { |
| 33 | + "action" : "delay", |
| 34 | + "seconds" : 1 |
| 35 | + }, |
33 | 36 | //The click and drag delta command moves a specific distance from the
|
34 | 37 | //current mouse position. For additional information about actions
|
35 | 38 | //and their syntax, please view the submitty wiki.
|
36 |
| - "click and drag delta 100 0", |
| 39 | + { |
| 40 | + "action" : "click and drag delta", |
| 41 | + "end_x" : 100 |
| 42 | + }, |
37 | 43 | //This program uses many unecessarily delays. Experiment by removing
|
38 | 44 | //them.
|
39 |
| - "delay 1", |
40 |
| - "click and drag delta -100 0", |
41 |
| - "delay 1", |
42 |
| - "click and drag delta 0 100", |
43 |
| - "delay 1", |
44 |
| - "click and drag delta 0 -100", |
45 |
| - "delay 1", |
46 |
| - "click and drag delta 1000 0", |
47 |
| - "delay 1", |
48 |
| - "click and drag delta -1000 0", |
49 |
| - "delay 1", |
50 |
| - "click and drag delta 0 160", |
51 |
| - "delay 1", |
52 |
| - "click and drag delta 0 -160", |
53 |
| - "delay 1", |
54 |
| - "click and drag delta 300 300", |
55 |
| - "delay 1", |
| 45 | + { |
| 46 | + "action" : "delay", |
| 47 | + "seconds" : 1 |
| 48 | + }, |
| 49 | + { |
| 50 | + "action" : "click and drag delta", |
| 51 | + "end_x" : -100 |
| 52 | + }, |
| 53 | + { |
| 54 | + "action" : "delay", |
| 55 | + "seconds" : 1 |
| 56 | + }, |
| 57 | + { |
| 58 | + "action" : "click and drag delta", |
| 59 | + "end_y" : 100 |
| 60 | + }, |
| 61 | + { |
| 62 | + "action" : "delay", |
| 63 | + "seconds" : 1 |
| 64 | + }, |
| 65 | + { |
| 66 | + "action" : "click and drag delta", |
| 67 | + "end_y" : -100 |
| 68 | + }, |
| 69 | + { |
| 70 | + "action" : "delay", |
| 71 | + "seconds" : 1 |
| 72 | + }, |
| 73 | + { |
| 74 | + "action" : "click and drag delta", |
| 75 | + "end_x" : 1000 |
| 76 | + }, |
| 77 | + { |
| 78 | + "action" : "delay", |
| 79 | + "seconds" : 1 |
| 80 | + }, |
| 81 | + { |
| 82 | + "action" : "click and drag delta", |
| 83 | + "end_x" : -1000 |
| 84 | + }, |
| 85 | + { |
| 86 | + "action" : "delay", |
| 87 | + "seconds" : 1 |
| 88 | + }, |
| 89 | + { |
| 90 | + "action" : "click and drag delta", |
| 91 | + "end_y" : 160 |
| 92 | + }, |
| 93 | + { |
| 94 | + "action" : "delay", |
| 95 | + "seconds" : 1 |
| 96 | + }, |
| 97 | + { |
| 98 | + "action" : "click and drag delta", |
| 99 | + "end_y" : -160 |
| 100 | + }, |
| 101 | + { |
| 102 | + "action" : "delay", |
| 103 | + "seconds" : 1 |
| 104 | + }, |
| 105 | + { |
| 106 | + "action" : "click and drag delta", |
| 107 | + "end_x" : 300, |
| 108 | + "end_y" : 300 |
| 109 | + }, |
| 110 | + { |
| 111 | + "action" : "delay", |
| 112 | + "seconds" : 1 |
| 113 | + }, |
56 | 114 | //moves the mouse to 0,0 (upper left) on the window.
|
57 |
| - "origin", |
58 |
| - "delay 1", |
| 115 | + { |
| 116 | + "action" : "origin" |
| 117 | + }, |
| 118 | + { |
| 119 | + "action" : "delay", |
| 120 | + "seconds" : 1 |
| 121 | + }, |
59 | 122 | //Centers the mouse on the screen
|
60 |
| - "center", |
61 |
| - "delay 1", |
62 |
| - "mouse move 10 200", |
63 |
| - "delay 1", |
64 |
| - "click and drag 10 10 150 150", |
65 |
| - "delay 1", |
66 |
| - "click and drag 160 160", |
| 123 | + { |
| 124 | + "action" : "center" |
| 125 | + }, |
| 126 | + { |
| 127 | + "action" : "delay", |
| 128 | + "seconds" : 1 |
| 129 | + }, |
| 130 | + { |
| 131 | + "action" : "move mouse", |
| 132 | + "end_x" : 10, |
| 133 | + "end_y" : 200 |
| 134 | + }, |
| 135 | + { |
| 136 | + "action" : "delay", |
| 137 | + "seconds" : 1 |
| 138 | + }, |
| 139 | + { |
| 140 | + "action" : "click and drag", |
| 141 | + "start_x" : 10, |
| 142 | + "start_y" : 10, |
| 143 | + "end_x" : 150, |
| 144 | + "end_y" : 150 |
| 145 | + }, |
| 146 | + { |
| 147 | + "action" : "delay", |
| 148 | + "seconds" : 1 |
| 149 | + }, |
| 150 | + { |
| 151 | + "action" : "click and drag", |
| 152 | + "end_x" : 160, |
| 153 | + "end_y" : 160 |
| 154 | + }, |
67 | 155 | //takes a screenshot, labeled sequentially starting from 0.
|
68 |
| - "screenshot", |
| 156 | + { |
| 157 | + "action" : "screenshot" |
| 158 | + }, |
69 | 159 | //In the provided application, q indicates a program quit.
|
70 |
| - "type 'q'"], |
| 160 | + { |
| 161 | + "action" : "key", |
| 162 | + "key_combination" : "q" |
| 163 | + } |
| 164 | + ], |
71 | 165 | "points" : 1,
|
72 | 166 | "validation": [
|
73 | 167 | {
|
|
85 | 179 | "title" : "Graphics program 1",
|
86 | 180 | "command" : "./a.out -input sierpinski_triangle.txt -size 400 -iters 0 -cubes",
|
87 | 181 | "actions" : [
|
88 |
| - "click and drag delta 50 -125", |
89 |
| - "delay 1", |
90 |
| - "screenshot", |
91 |
| - "type 'q'" |
| 182 | + { |
| 183 | + "action" : "click and drag delta", |
| 184 | + "end_x" : 50, |
| 185 | + "end_y" : -125 |
| 186 | + }, |
| 187 | + { |
| 188 | + "action" : "delay", |
| 189 | + "seconds" : 1 |
| 190 | + }, |
| 191 | + { |
| 192 | + "action" : "screenshot" |
| 193 | + }, |
| 194 | + { |
| 195 | + "action" : "key", |
| 196 | + "key_combination" : "q" |
| 197 | + } |
92 | 198 | ],
|
93 | 199 | "points" : 1,
|
94 | 200 | "validation": [
|
|
0 commit comments