pygo/pygo.py

39 lines
587 B
Python
Raw Normal View History

#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# A GTK Python GO client
import sys
sys.path.append('lib/')
2012-04-15 05:00:36 +00:00
import ConfigParser
import goban
import pygogui
def main():
2012-04-15 05:00:36 +00:00
# Read config file
settings = read_config_file()
# Data
gb = goban.Goban()
network_mode = False
our_color = None
gui = pygogui.GUI(gb)
gui.update(gb)
while True:
2012-04-15 05:00:36 +00:00
gui.do_event(gb, network_mode, our_color)
gui.update(gb)
2012-04-15 05:00:36 +00:00
def read_config_file():
ret = ConfigParser.ConfigParser()
ret.read('pygo.cfg')
return ret
if __name__ == '__main__': main()