X-Git-Url: https://git.ucc.asn.au/?p=progcomp2013.git;a=blobdiff_plain;f=qchess%2Fqchess.py;h=e2293ae7e8789ada51d4f2d53351aafcbbb2949f;hp=8deeddb3cc0c5991a8dfddd7c524c43002a5d6a9;hb=8a1471b7bee654a02fc205dd4de7bebd12084435;hpb=8571bc0c18f4a42bd1c8f34a5a36bcd9678b3f14 diff --git a/qchess/qchess.py b/qchess/qchess.py index 8deeddb..e2293ae 100755 --- a/qchess/qchess.py +++ b/qchess/qchess.py @@ -1256,7 +1256,7 @@ class NetworkSender(Player,Network): class NetworkReceiver(Player,Network): def __init__(self, colour, address=None): - Player.__init__(self, address, colour) + Player.__init__(self, "NetworkReceiver", colour) self.address = address @@ -1349,7 +1349,7 @@ class LogFile(): def setup(self, board, players): for p in players: - self.log.write("# " + p.colour + " : " + p.name + "\n") + self.log.write("# " + str(p.colour) + " : " + str(p.name) + "\n") self.log.write("# Initial board\n") for x in range(0, w): @@ -1874,8 +1874,10 @@ def load_images(image_dir=os.path.join(os.path.curdir, "data", "images")): small_images[c].update({p : pygame.image.load(os.path.join(image_dir, c + "_" + p + "_small.png"))}) # --- images.py --- # graphics_enabled = True + try: import pygame + os.environ["SDL_VIDEO_ALLOW_SCREENSAVER"] = "1" except: graphics_enabled = False @@ -1907,7 +1909,7 @@ class GraphicsThread(StoppableThread): pygame.font.Font(os.path.join(os.path.curdir, "data", "DejaVuSans.ttf"), 32).render("Hello", True,(0,0,0)) #load_images() - load_images() + create_images(grid_sz) """ for c in images.keys(): @@ -2631,4 +2633,4 @@ if __name__ == "__main__": sys.exit(102) # --- main.py --- # -# EOF - created from make on Thu Mar 21 12:27:36 WST 2013 +# EOF - created from make on Wed Mar 27 12:42:42 WST 2013