| 19 | G = 8 |
| 20 | |
| 21 | class GravSys(object): |
| 22 | def __init__(self): |
| 23 | self.planets = [] |
| 24 | self.t = 0 |
| 25 | self.dt = 0.01 |
| 26 | def init(self): |
| 27 | for p in self.planets: |
| 28 | p.init() |
| 29 | def start(self): |
| 30 | for i in range(10000): |
| 31 | self.t += self.dt |
| 32 | for p in self.planets: |
| 33 | p.step() |
| 34 | |
| 35 | class Star(Turtle): |
| 36 | def __init__(self, m, x, v, gravSys, shape): |
no outgoing calls
no test coverage detected
searching dependent graphs…