-
- result = result.split(" ")
- [x,y] = map(int, result[0:2])
- selected = self.board.grid[x][y]
- if selected != None and selected.colour == self.colour and len(result) > 2 and not "->" in result:
- s = self.get_response()
- #print str(self) + ".update - receives " + str(s)
- s = s.split(" ")
- selected.choice = int(s[2])
- for i in range(2):
- selected.types[i] = str(s[3+i])
- if s[3+i] == "unknown":
- selected.types_revealed[i] = False
- else:
- selected.types_revealed[i] = True
- selected.current_type = selected.types[selected.choice]
- else:
- pass
- #print str(self) + ".update - ignore result " + str(result)
+ if self.server == True:
+ return result
+ s = self.get_response()
+ #debug(str(self) + ".update reads: " + str(s))
+ if not "->" in s.split(" "):
+ self.board.update(s, sanity=False)
+ return s