MCPcopy
hub / github.com/CharlesPikachu/Games / urge

Method urge

cpgames/core/games/gobang/modules/online/server.py:118–122  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

116 self.tcp_socket.sendall(packSocketData(data))
117 '''催促'''
118 def urge(self):
119 if self.tcp_socket and self.is_gaming and (self.winner is None) and (self.whoseround == self.opponent_player_color):
120 data = {'type': 'action', 'detail': 'urge'}
121 self.tcp_socket.sendall(packSocketData(data))
122 self.urge_sound.play()
123 '''鼠标左键点击事件-玩家回合'''
124 def mousePressEvent(self, event):
125 if (self.tcp_socket is None) or (event.buttons() != QtCore.Qt.LeftButton) or (self.winner is not None) or (self.whoseround != self.player_color) or (not self.is_gaming):

Callers

nothing calls this directly

Calls 1

packSocketDataFunction · 0.85

Tested by

no test coverage detected