Tests examples for the miniworldmaker engine https://www.miniworldmaker.de
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

33 lines
786 B

from miniworldmaker import *
board = Board((800, 600))
a = Circle()
a.direction = 45
assert(a.direction == 45)
assert(a.direction_at_unit_circle == 45)
a.direction = 0
assert(a.direction == 0)
assert(a.direction_at_unit_circle == 90)
a.direction = -90
assert(a.direction == -90)
print(a.direction_at_unit_circle)
assert(a.direction_at_unit_circle == -180)
a.direction = 180
print(a.direction)
assert(abs(a.direction) == 180)
assert(a.direction_at_unit_circle == -90)
a.direction_at_unit_circle = -90
assert(abs(a.direction) == 180)
print(a.direction_at_unit_circle)
assert(a.direction_at_unit_circle == -90)
a.direction_at_unit_circle = -180
print(a.direction)
assert(a.direction == -90)
print(a.direction_at_unit_circle)
assert(a.direction_at_unit_circle == -180)
board.run()