-
Notifications
You must be signed in to change notification settings - Fork 0
module simulator
Tianshu Huang edited this page Dec 2, 2018
·
4 revisions
| Slack | Github | |
|---|---|---|
| Matthew | @RoboticFish | @dimembermatt |
| Mina | @minagawargious | @MinaGawargious |
| Chad | @chadharthan | @chardharthan |
Class Object:
Attributes:
- x
- y
- theta
- shape
- size
- color
- id
Methods:
- draw
- collision(Object) -> bool
Class Cube(Object):
Attributes:
- letter
Class Robot(Object):
Attributes:
- name
Methods:
- move(rotate=0, forward=0)
Class Field:
Attributes:
- objects
Methods:
- check_collisions() -> bool
for x in objects:
for y in objects:
if x.id != y.id and x.collision(y):
show collision message
- draw
- loop:
clear_screen()
self.draw()
for x in self.objects:
x.draw()