MCPcopy Create free account
hub / github.com/THUDM/AgentTuning / __init__

Method __init__

AgentBench.old/src/tasks/card_game/Tools/player.py:22–36  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

20
21class Player:
22 def __init__(self):
23 while True:
24 print('请输入回放文件路径:', end='')
25 path = input()
26 if path[-5:] != '.json':
27 print('路径输入有误,请重试!')
28 continue
29 try:
30 self.data = json.load(open(path))
31 break
32 except FileNotFoundError:
33 print('路径输入有误,请重试!')
34
35 # 一个列表,元素为两个列表(代表双方**场上**Fish)
36 self.field = [[], []]
37
38 def play(self):
39 f = open('replay.txt', 'w', encoding='utf-8')

Callers

nothing calls this directly

Calls 1

loadMethod · 0.45

Tested by

no test coverage detected