import netrek import time from netrek import options class TestGalactic(netrek.PhaseFlightGalactic): def cycle(self): for angle in range(255): netrek.me.sp_player(angle, 4, 2000+(angle*20), 2000+(angle*20)) netrek.other.sp_player((angle + 128) % 256, 4, 4000+(angle*20), 2000+(angle*20)) self.update() time.sleep(.01) netrek.pygame.display.flip() class TestTactical(netrek.PhaseFlightTactical): def cycle(self): for angle in range(255): netrek.me.sp_player(angle, 4, 2000+(angle*20), 2000+(angle*20)) netrek.other.sp_player((angle + 128) % 256, 4, 4000+(angle*20), 2000+(angle*20)) self.update() time.sleep(.01) netrek.pygame.display.flip() def setup(): netrek.opt, args = options.parser.parse_args() netrek.opt.chosen = 'No Server' netrek.screen = netrek.pg_init() netrek.me = netrek.Ship(1) netrek.other = netrek.Ship(2) netrek.other.sp_player_info(2,2) netrek.me.sp_you(0,0,0,0,0,0,0,0,0,0,0,0) netrek.me.sp_player_info(1, 1) netrek.background = netrek.screen.copy() def test_gal(): ph_galactic = TestGalactic() netrek.ShipGalacticSprite(netrek.me).show() netrek.ShipGalacticSprite(netrek.other).show() ph_galactic.do() def test_tac(): ph_tactical = TestTactical() netrek.ShipTacticalSprite(netrek.me).show() netrek.ShipTacticalSprite(netrek.other).show() ph_tactical.do() setup() test_tac() test_gal()