cellularautomaton/glMain.py

24 lines
447 B
Python
Raw Permalink Normal View History

2017-05-18 20:58:15 +02:00
from field import *
from glField import *
def main():
f = Field((160, 90))
r = rule.Rule(2)
f.setRule(r)
f.setValue(2, 2, 1)
screen = GLField(160, 90, 800,600, False)
screen.start()
counter = 0
while screen.is_alive():
f.update()
c = f.getUpdatedValues()
screen.appendChanges(c)
print("master thread #" + str(counter))
counter += 1
if __name__ == '__main__':
main()