List of commits:
Subject Hash Author Date (UTC)
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
Added first paths of crossroad. Also added reference of crossroad. 43a5ddf291e38b47bad02a92af58839d86f9d449 Jan Allersma 2017-09-21 12:21:53
Added first paths of crossroad. Also added reference of crossroad. bb687a8152231d0c89fed827baefcfbf067be90c Jan Allersma 2017-09-21 12:21:11
Fixed typo. db82c84f8d834e62cb37333ff973ddc54af5372f Jan Allersma 2017-09-20 20:51:15
RabbitMQ test.First attempt. 876d29c668f5e027a820f3ff48a6ca080fc530c2 Jan Allersma 2017-09-19 13:47:31
Initial commit 6a565c61a3337232d0e7a136ffb2f49b431c2a40 Jan Allersma 2017-09-11 06:52:38
Commit 0b65d450fea6d9f679029f2d6765c7e2d1126cdd - It's actually working now! With a gameloop and new icons :D
Author: Jan Allersma
Author date (UTC): 2017-11-20 22:02
Committer name: Jan Allersma
Committer date (UTC): 2017-11-20 22:02
Parent(s): 9a6afe028642b571483fccd6d6bdab10dee68e9c
Signer:
Signing key:
Signing status: N
Tree: 2d9a99c5a6a4d2e98c3dbafaa931ad62f7cae773
File Lines added Lines deleted
.gitignore 1 0
simulatie/Auto.png 0 0
simulatie/Auto.xcf 0 0
simulatie/Fietser.png 0 0
simulatie/Fietser.xcf 0 0
simulatie/Trein.png 0 0
simulatie/Trein.xcf 0 0
simulatie/connection.py 10 3
simulatie/model.py 1 1
simulatie/pyg.py 26 14
simulatie/test/connection.py 2 2
simulatie/test/model.py 2 2
File .gitignore changed (mode: 100644) (index 0d20b64..c6829d5)
1 1 *.pyc *.pyc
2 */.vscode
File simulatie/Auto.png added (mode: 100644) (index 0000000..36962c7)
File simulatie/Auto.xcf added (mode: 100644) (index 0000000..ce018b1)
File simulatie/Fietser.png added (mode: 100644) (index 0000000..be84c21)
File simulatie/Fietser.xcf added (mode: 100644) (index 0000000..99fbf5d)
File simulatie/Trein.png added (mode: 100644) (index 0000000..c7254fe)
File simulatie/Trein.xcf added (mode: 100644) (index 0000000..77f24a0)
File simulatie/connection.py changed (mode: 100644) (index f4f7402..8acadb2)
1 1 import pika import pika
2 import model
3 2 import threading import threading
4 3
4 import model
5 import pyg
6
5 7 creds = pika.PlainCredentials(model.uname, model.passwd) creds = pika.PlainCredentials(model.uname, model.passwd)
6 8 SendConnection = pika.BlockingConnection(pika.ConnectionParameters(host=model.host, virtual_host=model.vhost, credentials=creds)) SendConnection = pika.BlockingConnection(pika.ConnectionParameters(host=model.host, virtual_host=model.vhost, credentials=creds))
7 9 RecieveConnection = pika.BlockingConnection(pika.ConnectionParameters(host=model.host, virtual_host=model.vhost, credentials=creds)) RecieveConnection = pika.BlockingConnection(pika.ConnectionParameters(host=model.host, virtual_host=model.vhost, credentials=creds))
8 10 channel = SendConnection.channel() channel = SendConnection.channel()
9 11 recieve = RecieveConnection.channel() recieve = RecieveConnection.channel()
10 12
11 channel.queue_declare(
12 queue=model.sendQueue,
13 recieve.queue_declare(
14 queue=model.recieveQueue,
13 15 arguments={'x-message-ttl' : 10000}, arguments={'x-message-ttl' : 10000},
14 16 auto_delete=True auto_delete=True
15 17 ) )
 
... ... thread = threading.Thread(target=listen)
39 41 thread.setDaemon(True) thread.setDaemon(True)
40 42 thread.start() thread.start()
41 43 thread.join(0) thread.join(0)
44
45 gamethread = threading.Thread(target=pyg.gameloop)
46 gamethread.setDaemon(True)
47 gamethread.start()
48 gamethread.join(0)
File simulatie/model.py changed (mode: 100644) (index 31c3152..f5ada36)
1 1 # Jan Allersma: groep 8. Maakt simulator. # Jan Allersma: groep 8. Maakt simulator.
2 2 uname = 'softdev' uname = 'softdev'
3 3 passwd = 'softdev' passwd = 'softdev'
4 vhost = '/4'
4 vhost = '/2'
5 5 host = '127.0.0.1'#'141.252.237.17' host = '127.0.0.1'#'141.252.237.17'
6 6
7 7 recieveQueue = 'simulator' recieveQueue = 'simulator'
File simulatie/pyg.py changed (mode: 100644) (index eb29611..87527c7)
... ... screen = pygame.display.set_mode((800,600))
9 9 screen.fill((255,255,255)) screen.fill((255,255,255))
10 10 bg = pygame.transform.scale(pygame.image.load("kruispunt.png"), (800,600)) bg = pygame.transform.scale(pygame.image.load("kruispunt.png"), (800,600))
11 11
12 class Auto(object):
13 def __init__(self, x, y):
14 self.auto = pygame.transform.scale(pygame.image.load("auto.png"), (64,64))
12 class Vehicle(object):
13 def __init__(self, x, y, trafficId):
14 if trafficId >= 100 and trafficId < 200: # Is een auto
15 self.auto = pygame.transform.scale(pygame.image.load("Auto.png"), (64,64))
16 elif trafficId < 300: # Is een bus
17 self.auto = pygame.transform.scale(pygame.image.load("Auto.png"), (64,64))
18 elif trafficId < 400: # Is een fietser
19 self.auto = pygame.transform.scale(pygame.image.load("Fietser.png"), (64,64))
20 elif trafficId < 500: # Is een voetganger
21 self.auto = pygame.transform.scale(pygame.image.load("Fietser.png"), (64,64))
22 elif trafficId < 600: # Is een trein
23 self.auto = pygame.transform.scale(pygame.image.load("Trein.png"), (64,64))
24 else: # zijn slagbomen
25 pass
15 26 self.rect = self.auto.get_rect() self.rect = self.auto.get_rect()
16 27 self.dest = [x,y] self.dest = [x,y]
17 28 self.speed = [0,0] self.speed = [0,0]
 
... ... class Auto(object):
35 46 self.dest = [x,y] self.dest = [x,y]
36 47 self.speed = [1,1] self.speed = [1,1]
37 48
38 car = Auto(50,50)
49 car = Vehicle(50,50, 102)
39 50 clock = pygame.time.Clock() clock = pygame.time.Clock()
40 51 car.goto(200,500) car.goto(200,500)
41 52
42 53 # Mainloop # Mainloop
43 while True:
44 clock.tick(60)
45 for event in pygame.event.get():
46 if event.type == pygame.QUIT: sys.exit()
47
48 screen.fill((255,255,255))
49 screen.blit(bg, bg.get_rect())
50 car.update()
51 screen.blit(car.auto, car.rect)
52 pygame.display.flip()
54 def gameloop():
55 while True:
56 clock.tick(60)
57 for event in pygame.event.get():
58 if event.type == pygame.QUIT: sys.exit()
59
60 screen.fill((255,255,255))
61 #screen.blit(bg, bg.get_rect())
62 car.update()
63 screen.blit(car.auto, car.rect)
64 pygame.display.flip()
File simulatie/test/connection.py changed (mode: 100644) (index 69e2a02..2c56479)
... ... connection = pika.BlockingConnection(pika.ConnectionParameters(host=model.host,
8 8 channel = connection.channel() channel = connection.channel()
9 9 recieve = connection.channel() recieve = connection.channel()
10 10
11 channel.queue_declare(
12 queue=model.sendQueue,
11 recieve.queue_declare(
12 queue=model.recieveQueue,
13 13 arguments={'x-message-ttl' : 10000}, arguments={'x-message-ttl' : 10000},
14 14 auto_delete=True auto_delete=True
15 15 ) )
File simulatie/test/model.py changed (mode: 100644) (index f5ada36..2e7628a)
... ... passwd = 'softdev'
4 4 vhost = '/2' vhost = '/2'
5 5 host = '127.0.0.1'#'141.252.237.17' host = '127.0.0.1'#'141.252.237.17'
6 6
7 recieveQueue = 'simulator'
8 sendQueue = 'controller'
7 recieveQueue = 'controller'
8 sendQueue = 'simulator'
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