-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIA.py
More file actions
25 lines (18 loc) · 651 Bytes
/
IA.py
File metadata and controls
25 lines (18 loc) · 651 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from Line import Player
class IA(object):
def __init__(self,game,player,name):
self.__game = game
self.__player = player
self.__name = name
def getGame(self):
return self.__game
def getName(self):
return self.__name
def getPlayerType(self):
return self.__player
def getOtherPlayerType(self):
return Player.HUMAN if self.__player == Player.COMPUTER else Player.COMPUTER
def nextMove(self):
return NotImplemented("Pas encore implémentée ! c'est une classe mère")
def playMove(self,move):
self.getGame().playMove(move,self.getPlayerType(),True)