Skip to content

Commit

Permalink
feat: ✨ Sucessfuly test PyAPI with server
Browse files Browse the repository at this point in the history
  • Loading branch information
sigureling committed Mar 30, 2024
1 parent 12e28f9 commit e69bc20
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions CAPI/python/PyAPI/AI.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,23 @@ def __init__(self, pID: int):

def SweeperPlay(self, api: ISweeperAPI) -> None:
# 公共操作

if self.__playerID == 0:
# player0的操作
return
elif self.__playerID == 1:
if self.__playerID == 1:
api.PrintSelfInfo()
time.sleep(1)
# player1的操作
return
elif self.__playerID == 2:
# player2的操作
return
return
elif self.__playerID == 3:
# player3的操作
return
elif self.__playerID == 4:
# player4的操作
return
returnF

def TeamPlay(self, api: ITeamAPI) -> None:
assert self.__playerID == 0, "Team's playerID must be 0"
# 操作
return

0 comments on commit e69bc20

Please sign in to comment.