예제 #1
0
파일: life.py 프로젝트: jrpotter/fifth
"""
B3/S23: Game of Life

@author: jrpotter
@date: June 01, 2015
"""
if __name__ == '__main__':

    import os, sys
    sys.path.append(os.path.abspath('src'))

    import cam
    import cam_parser

    c = cam.CAM(1, 100, 2)
    p = cam_parser.CAMParser('B3/S23', c)

    c.randomize()
    c.start(cam.CAM.Show.WINDOW, clock=50, rules=p.ruleset)
예제 #2
0
파일: ui.py 프로젝트: molock/Space-Train
 def show_cam(self, actor, actions):    
     ax = actor.abs_position_x() - 180
     ay = actor.abs_position_y() + (actor.height() / 2)
     px, py = actor.scene.camera.world_to_screen_position(ax, ay)
     self.cam = cam.CAM(actions, px, py, self)