Moved the parts of network out of server.
Partly added extensions to tic-tac-toe py.
This commit is contained in:
parent
f59d59814a
commit
71fa6f30ba
10 changed files with 237 additions and 74 deletions
15
games/tic-tac-toe/player.py
Normal file
15
games/tic-tac-toe/player.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
from pygame.mouse import get_pos
|
||||
from point import Point
|
||||
|
||||
class Player(object):
|
||||
def __init__(self, id, shape, board):
|
||||
self.shape = shape
|
||||
self.board = board
|
||||
self.id = id
|
||||
|
||||
|
||||
def turn(self):
|
||||
#Ask mouse for position
|
||||
board.make_turn(Point(get_pos()[0],get_pos()[1]))
|
||||
|
||||
|
Reference in a new issue