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.
miniworldmaker_cookbook/snippets/7 Processing/717_line_random_moving.py

12 lines
375 B

from miniworldmaker import *
import random
board = Board()
line = Line((100,100),(200,100))
def act(self):
self.start_position = (self.start_position[0] + random.randint(-1,1), self.start_position[1]+ random.randint(-1,1))
self.end_position = (self.end_position[0] + random.randint(-1,1), self.end_position[1]+ random.randint(-1,1))