diff options
author | Florian Jung <flo@windfisch.org> | 2015-08-10 01:21:51 +0200 |
---|---|---|
committer | Florian Jung <flo@windfisch.org> | 2015-08-10 01:21:51 +0200 |
commit | 63b1ba02ed3c2c648176c1003b87bdbe4f040822 (patch) | |
tree | 0c58e6345dfecdee6bb02a11798677956cb2a143 /main.py | |
parent | 847357fdefe3925f67824c5ec2f5a8d3c191843e (diff) |
split into files. refactor ALL teh thingz!!1
Diffstat (limited to 'main.py')
-rw-r--r-- | main.py | 39 |
1 files changed, 39 insertions, 0 deletions
@@ -0,0 +1,39 @@ +from agarnet.agarnet import client +from agarnet.agarnet import utils +import pygame +from pygame import gfxdraw +from pygame.locals import * +import sys +import math +import time +import gui +from subscriber import DummySubscriber + +sub = DummySubscriber() +c = client.Client(sub) + + +# find out server and token to connect +try: + token = sys.argv[1] + addr, *_ = utils.get_party_address(token) +except: + addr, token, *_ = utils.find_server() + +# connect +c.connect(addr,token) +c.send_facebook( + 'g2gDYQFtAAAAEKO6L3c8C8/eXtbtbVJDGU5tAAAAUvOo7JuWAVSczT5Aj0eo0CvpeU8ijGzKy/gXBVCxhP5UO+ERH0jWjAo9bU1V7dU0GmwFr+SnzqWohx3qvG8Fg8RHlL17/y9ifVWpYUdweuODb9c=') + +c.player.nick="test cell pls ignore" +c.send_spectate() + + +# initialize GUI +gui.set_client(c) + + +# main loop +while True: + c.on_message() + gui.tick() |