X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=qchess%2Fsrc%2Fnetwork.py;h=75df117ccb60723c6f92c1f499082c39eeb617ac;hb=13106edfbf2a97cdb79148ea43067d8f31fac083;hp=72467d8bb321a1dbe424772954418411b4fad52b;hpb=444244d5c7698bb7861cdb7c0ec6bfb0e8cebfb7;p=progcomp2013.git diff --git a/qchess/src/network.py b/qchess/src/network.py index 72467d8..75df117 100644 --- a/qchess/src/network.py +++ b/qchess/src/network.py @@ -116,7 +116,7 @@ class NetworkSender(Player,Network): if selected != None and selected.colour == self.colour and len(s) > 2 and not "->" in s: s = " ".join(s[0:3]) for i in range(2): - if selected.types_revealed[i] == True: + if selected.types[i][0] == '?': s += " " + str(selected.types[i]) else: s += " unknown" @@ -132,7 +132,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 @@ -177,9 +177,9 @@ class NetworkReceiver(Player,Network): for i in range(2): selected.types[i] = str(s[3+i]) if s[3+i] == "unknown": - selected.types_revealed[i] = False + selected.types[i] = '?'+selected.types[i] else: - selected.types_revealed[i] = True + selected.types[i] = selected.types[i][1:] selected.current_type = selected.types[selected.choice] else: pass