List of commits:
Subject Hash Author Date (UTC)
More Waypoints! 465108ac6a127bbda26b40989fd6a68cd3e00aad Jan Allersma 2017-11-30 12:52:22
Added voetganger. dad12c3d2eb2a7160838c3495e4a7a2d382e493f Jan Allersma 2017-11-30 12:32:35
Added all waiting waypoints for 1xx. bbba002738e0a26b085673400c76329d3055d8ba Jan Allersma 2017-11-29 12:00:37
Simulation now working correctly for ID's 101, 102 and 103. 1bc2fb65bb75b3a1f63cf7690472152fe1f32564 Jan Allersma 2017-11-28 16:22:53
Autos kunnen gespawned worden en rijden dan de goede richting op. b36ef1cafeda20d5753b72c6f8e6ac8423c42d95 Jan Allersma 2017-11-26 21:44:39
Last changes before test case 5. 258ba4735dfd2078f8e4f034fffed2bbbb086f2a Jan Allersma 2017-11-22 14:08:37
hallo dit is kapot maar het werkt woehoe 4475c2633e962688c71634d633ac8789524f16cf XCBouke 2017-11-22 13:58:54
It's actually working now! With a gameloop and new icons :D 0b65d450fea6d9f679029f2d6765c7e2d1126cdd Jan Allersma 2017-11-20 22:02:23
Something... Works?? 9a6afe028642b571483fccd6d6bdab10dee68e9c Jan Allersma 2017-11-20 15:14:07
User input for sending msg. cdd1c17cfe8cc73985945aad5878e4891e92eab1 Jan Allersma 2017-11-14 23:05:53
prutsen veel prusten f37cf730ff7a0ad2e08cd769da5f488051ac6dd4 XCBouke 2017-11-09 21:32:15
uglyJsonCode created online with Bitbucket ed6c9c541947ec64827b6e80ed959feb1b0f9b85 XCBouke 2017-11-09 14:29:36
Connectie created online with Bitbucket (send en recieve in 1) b484aff52014ff8d1dbaf8387cf1479cf236f33a XCBouke 2017-11-09 14:28:29
Ready for test case 3. Also BIG cleanup. bda906e19e3b82fb91df53eb2208e8def822c6b5 Jan Allersma 2017-11-05 21:38:16
test case 2 fix(?) dd86d637d166707a31b644dad711c7a9e39dbc8d Jan Allersma 2017-11-04 10:55:03
Test case 2 9ea6eadbd85dde0e9522068718092b1f0e9b49f0 Jan Allersma 2017-10-29 22:37:57
Added threading. 4540fe1669c9e145e613edf2459031e7bec500ea Jan Allersma 2017-10-29 20:47:49
Code for testing 16/10/17. Use simulatie/rabbit/combination.py mainly. c5e87d7fe5abbcd3316b1538a0d647fd23faa59f Jan Allersma 2017-10-15 19:13:23
Added more paths. Some of them are WIP. 03ad1039e22bd1ebd301bda99e78f38239a15077 Jan Allersma 2017-09-21 14:40:44
Added paths... 5561d21918f048a40ca9686112638a48805917e3 Jan Allersma 2017-09-21 13:06:43
Commit 465108ac6a127bbda26b40989fd6a68cd3e00aad - More Waypoints!
Author: Jan Allersma
Author date (UTC): 2017-11-30 12:52
Committer name: Jan Allersma
Committer date (UTC): 2017-11-30 12:52
Parent(s): dad12c3d2eb2a7160838c3495e4a7a2d382e493f
Signing key:
Tree: ce4924546b9d7d8557ee1fb1b039526e66cc894f
File Lines added Lines deleted
simulatie/pyg.py 11 6
simulatie/trafficModel.py 76 61
File simulatie/pyg.py changed (mode: 100644) (index 4dbb9e0..749b178)
... ... class Vehicle(object):
28 28 elif trafficType < 400: # Is een fietser elif trafficType < 400: # Is een fietser
29 29 self.auto = pygame.transform.scale(pygame.image.load("Fietser.png"), (64,64)) self.auto = pygame.transform.scale(pygame.image.load("Fietser.png"), (64,64))
30 30 elif trafficType < 500: # Is een voetganger elif trafficType < 500: # Is een voetganger
31 self.auto = pygame.transform.scale(pygame.image.load("Fietser.png"), (64,64))
31 self.auto = pygame.transform.scale(pygame.image.load("Voetganger.png"), (64,64))
32 32 elif trafficType < 600: # Is een trein elif trafficType < 600: # Is een trein
33 33 self.auto = pygame.transform.scale(pygame.image.load("Trein.png"), (64,64)) self.auto = pygame.transform.scale(pygame.image.load("Trein.png"), (64,64))
34 34 else: # zijn slagbomen else: # zijn slagbomen
 
... ... class Vehicle(object):
44 44 self.rect.x = tm.queues[trafficId][0][0] self.rect.x = tm.queues[trafficId][0][0]
45 45 self.rect.y = tm.queues[trafficId][0][1] self.rect.y = tm.queues[trafficId][0][1]
46 46
47 if trafficType == 103 or trafficType == 106 or trafficType == 108 or trafficType == 109 or trafficType == 110:
47 if trafficType == 103 or trafficType == 106 or trafficType == 108 or trafficType == 109 or trafficType == 110 or trafficType == 303 or trafficType == 402:
48 48 self.auto = pygame.transform.flip(self.auto, True, False) self.auto = pygame.transform.flip(self.auto, True, False)
49 49
50 50 def update(self): def update(self):
 
... ... class Vehicle(object):
75 75 self.wp += 1 self.wp += 1
76 76 print("W: " + str(self.wp) + " / " + str(len(tm.queues[self.trafficId]))) print("W: " + str(self.wp) + " / " + str(len(tm.queues[self.trafficId])))
77 77
78 # elif self.waiting: # Debug
79 # time.sleep(1)
80 # tm.lights[self.trafficId]["Status"] = 1 # Debug
81
78 82 elif not self.waiting and self.wp < len(tm.waypoints[self.trafficId]): elif not self.waiting and self.wp < len(tm.waypoints[self.trafficId]):
79 83 self.goto(tm.waypoints[self.trafficId][self.wp][0], tm.waypoints[self.trafficId][self.wp][1]) self.goto(tm.waypoints[self.trafficId][self.wp][0], tm.waypoints[self.trafficId][self.wp][1])
80 84 self.wp += 1 self.wp += 1
 
... ... def spawnVehicle(index):
120 124
121 125 # Mainloop # Mainloop
122 126 def gameloop(): def gameloop():
123 id = 5
124 car = Vehicle(tm.queues[id][0][0],tm.queues[id][0][1],id)
127 #id = 16
128 #car = Vehicle(tm.queues[id][0][0],tm.queues[id][0][1],id)
125 129 while True: while True:
126 130 clock.tick(60) clock.tick(60)
127 131 for event in pygame.event.get(): for event in pygame.event.get():
 
... ... def gameloop():
131 135 screen.blit(bg, bg.get_rect()) screen.blit(bg, bg.get_rect())
132 136 for vehicle in vehicles: for vehicle in vehicles:
133 137 vehicle.trafficCheck() vehicle.trafficCheck()
134 car.trafficCheck()
135 #screen.blit(car.auto, car.rect)
138 #car.trafficCheck()
136 139 pygame.display.flip() pygame.display.flip()
140
141 #gameloop()
File simulatie/trafficModel.py changed (mode: 100644) (index dc21a1d..e67a96e)
... ... lights = [
151 151
152 152 queues = [ queues = [
153 153 [ # 101 [ # 101
154 [300, -50],
155 [300, 0],
156 [300, 140]
154 [300, -50], [300, 140]
157 155 ], ],
158 156 [ # 102 [ # 102
159 [350, -50],
160 [350, 0],
161 [350, 140]
157 [350, -50], [350, 140]
162 158 ], ],
163 159 [ # 103 [ # 103
164 [400, -50],
165 [400, 0],
166 [400, 140]
160 [400, -50], [400, 140]
167 161 ], ],
168 162 [ # 104 [ # 104
169 [850, 350],
170 [650, 350]
163 [850, 350], [650, 350]
171 164 ], ],
172 165 [ # 105 [ # 105
173 [850, 400],
174 [650, 400]
166 [850, 400], [650, 400]
175 167 ], ],
176 168 [ # 106A [ # 106A
177 [470, 850],
178 [470, 690]
169 [470, 850], [470, 690]
179 170 ], ],
180 171 [ # 107 [ # 107
181 [430, 850],
182 [470, 690]
172 [430, 850], [470, 690]
183 173 ], ],
184 174 [ #108 [ #108
185 [-50, 450],
186 [150, 450]
175 [-50, 450], [150, 450]
187 176 ], ],
188 177 [ # 109 [ # 109
189 [-50, 400],
190 [150, 400]
178 [-50, 400], [150, 400]
191 179 ], ],
192 180 [ # 110 [ # 110
193 [-50, 350],
194 [150, 350]
181 [-50, 350], [150, 350]
182 ],
183 [ # 201
184 [0,0]
185 ],
186 [ # 301
187 [250, -50], [250, 250]
188 ],
189 [ # 302
190 [-50, 250], [250, 250]
191 ],
192 [ # 303
193 [850, 250], [550, 250]
194 ],
195 [ # 304
196 [540, 850], [540, 600]
197 ],
198 [ # 305
199 [260, 850], [260, 500]
200 ],
201 [ # 401
202 [220, -50], [220, 250]
203 ],
204 [ # 402
205 [-50, 200], [270, 200]
195 206 ] ]
196 207 ] ]
197 208
198 209 waypoints = [ waypoints = [
199 210 [ # 101 [ # 101
200 #[300, -50],
201 #[300, 0],
202 #[300, 140]
203 [300, 280],
204 [-50, 300]
211 [300, 280], [-50, 300]
205 212 ], ],
206 213 [ # 102 [ # 102
207 #[350, -50],
208 #[350, 0],
209 [350, 300],
210 [310, 600],
211 [310, 850]
214 [350, 300], [310, 600], [310, 850]
212 215 ], ],
213 216 [ # 103 [ # 103
214 #[400, -50],
215 #[400, 0],
216 [400, 350],
217 [850, 450]
217 [400, 350], [850, 450]
218 218 ], ],
219 219 [ #104 [ #104
220 #[850, 350],
221 [500, 350],
222 [490, -50]
220 [500, 350], [490, -50]
223 221 ], ],
224 222 [ #105 [ #105
225 #[850, 400],
226 [500, 400],
227 [300, 300],
228 [-50, 300]
223 [500, 400], [300, 300], [-50, 300]
229 224 ], ],
230 225 [ # 106A [ # 106A
231 #[470, 850],
232 [470, 500],
233 [490, -50]
226 [470, 500], [490, -50]
234 227 ], ],
235 228 [ # 107 [ # 107
236 #[430, 850],
237 [420, 400],
238 [300, 300],
239 [-50, 300]
229 [420, 400], [300, 300], [-50, 300]
240 230 ], ],
241 231 [ # 108 [ # 108
242 #[-50, 450],
243 [310, 450],
244 [310, 850]
232 [310, 450], [310, 850]
245 233 ], ],
246 234 [ # 109 [ # 109
247 #[-50, 400],
248 [310, 400],
249 [500, 450],
250 [850, 450]
235 [310, 400], [500, 450], [850, 450]
251 236 ], ],
252 237 [ # 110 [ # 110
253 #[-50, 350],
254 [450, 350],
255 [490, -50]
238 [450, 350], [490, -50]
239 ],
240 [ # 201
241 [0,0]
242 ],
243 [ # 301
244 [250, 250], [250, 850]
245 ],
246 [ # 302
247 [250, 250], [850, 250]
248 ],
249 [ # 303
250 [-50, 250]
251 ],
252 [ # 304
253 [540, -50]
254 ],
255 [ # 305
256 [250, -50]
257 ],
258 [ # 401
259 [220, 325]
260 ],
261 [ # 402
262 [470, 200]
256 263 ] ]
264 ]
257 265
266 transforms = [
267 { "from": 401, "to": 411},
268 { "from": 402, "to": 408},
269 { "from": 403, "to": 407},
270 { "from": 404, "to": 410},
271 { "from": 405, "to": 409},
272 { "from": 406, "to": 412}
258 273 ] ]
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/kapstok/NHL-SoftDev

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/kapstok/NHL-SoftDev

Clone this repository using git:
git clone git://git.rocketgit.com/user/kapstok/NHL-SoftDev

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main