You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

DebugAPI.py 5.1 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. from Interface import IHumanAPI, IButcherAPI, IGameTimer, IAI
  2. from logic import ILogic
  3. from Interface import ILogic, IHumanAPI, IButcherAPI, IGameTimer
  4. from typing import List, Union
  5. import structures as THUAI6
  6. class HumanDebugAPI(IHumanAPI, IGameTimer):
  7. # 指挥本角色进行移动,`timeInMilliseconds` 为移动时间,单位为毫秒;`angleInRadian` 表示移动的方向,单位是弧度,使用极坐标——竖直向下方向为 x 轴,水平向右方向为 y 轴
  8. def __init__(self, logic: ILogic):
  9. self.__logic = logic
  10. def Move(self, timeInMilliseconds: int, angle: float) -> bool:
  11. pass
  12. # 向特定方向移动
  13. def MoveRight(self, timeInMilliseconds: int) -> bool:
  14. pass
  15. def MoveLeft(self, timeInMilliseconds: int) -> bool:
  16. pass
  17. def MoveUp(self, timeInMilliseconds: int) -> bool:
  18. pass
  19. def MoveDown(self, timeInMilliseconds: int) -> bool:
  20. pass
  21. # 道具和技能相关
  22. def PickProp(self, propType: THUAI6.PropType) -> bool:
  23. pass
  24. def UseProp(self) -> bool:
  25. pass
  26. def UseSkill(self) -> bool:
  27. pass
  28. # 消息相关,接收消息时无消息则返回(-1, '')
  29. def SendMessage(self, toID: int, message: str) -> bool:
  30. pass
  31. def HaveMessage(self) -> bool:
  32. pass
  33. def GetMessage(self) -> tuple[int, str]:
  34. pass
  35. # 等待下一帧
  36. def Wait(self) -> bool:
  37. pass
  38. # 获取各类游戏中的消息
  39. def GetFrameCount(self) -> int:
  40. pass
  41. def GetPlayerGUIDs(self) -> List[int]:
  42. pass
  43. def GetButchers(self) -> List[THUAI6.Butcher]:
  44. pass
  45. def GetHumans(self) -> List[THUAI6.Human]:
  46. pass
  47. def GetProps(self) -> List[THUAI6.Prop]:
  48. pass
  49. def GetSelfInfo(self) -> Union[THUAI6.Human, THUAI6.Butcher]:
  50. pass
  51. def GetFullMap(self) -> List[List[THUAI6.PlaceType]]:
  52. pass
  53. def GetPlaceType(self, cellX: int, cellY: int) -> THUAI6.PlaceType:
  54. pass
  55. # 用于DEBUG的输出函数,仅在DEBUG模式下有效
  56. def PrintHuman(self) -> None:
  57. pass
  58. def PrintButcher(self) -> None:
  59. pass
  60. def PrintProp(self) -> None:
  61. pass
  62. def PrintSelfInfo(self) -> None:
  63. pass
  64. # 人类阵营的特殊函数
  65. def Escape(self) -> bool:
  66. pass
  67. def StartFixMachine(self) -> bool:
  68. pass
  69. def EndFixMachine(self) -> bool:
  70. pass
  71. def StartSaveHuman(self) -> bool:
  72. pass
  73. def EndSaveHuman(self) -> bool:
  74. pass
  75. # Timer用
  76. def StartTimer(self) -> None:
  77. pass
  78. def EndTimer(self) -> None:
  79. pass
  80. def Play(self, ai: IAI) -> None:
  81. pass
  82. class ButcherDebugAPI(IButcherAPI, IGameTimer):
  83. # 指挥本角色进行移动,`timeInMilliseconds` 为移动时间,单位为毫秒;`angleInRadian` 表示移动的方向,单位是弧度,使用极坐标——竖直向下方向为 x 轴,水平向右方向为 y 轴
  84. def Move(self, timeInMilliseconds: int, angle: float) -> bool:
  85. pass
  86. # 向特定方向移动
  87. def MoveRight(self, timeInMilliseconds: int) -> bool:
  88. pass
  89. def MoveLeft(self, timeInMilliseconds: int) -> bool:
  90. pass
  91. def MoveUp(self, timeInMilliseconds: int) -> bool:
  92. pass
  93. def MoveDown(self, timeInMilliseconds: int) -> bool:
  94. pass
  95. # 道具和技能相关
  96. def PickProp(self, propType: THUAI6.PropType) -> bool:
  97. pass
  98. def UseProp(self) -> bool:
  99. pass
  100. def UseSkill(self) -> bool:
  101. pass
  102. # 消息相关,接收消息时无消息则返回(-1, '')
  103. def SendMessage(self, toID: int, message: str) -> bool:
  104. pass
  105. def HaveMessage(self) -> bool:
  106. pass
  107. def GetMessage(self) -> tuple[int, str]:
  108. pass
  109. # 等待下一帧
  110. def Wait(self) -> bool:
  111. pass
  112. # 获取各类游戏中的消息
  113. def GetFrameCount(self) -> int:
  114. pass
  115. def GetPlayerGUIDs(self) -> List[int]:
  116. pass
  117. def GetButchers(self) -> List[THUAI6.Butcher]:
  118. pass
  119. def GetHumans(self) -> List[THUAI6.Human]:
  120. pass
  121. def GetProps(self) -> List[THUAI6.Prop]:
  122. pass
  123. def GetSelfInfo(self) -> Union[THUAI6.Human, THUAI6.Butcher]:
  124. pass
  125. def GetFullMap(self) -> List[List[THUAI6.PlaceType]]:
  126. pass
  127. def GetPlaceType(self, cellX: int, cellY: int) -> THUAI6.PlaceType:
  128. pass
  129. # 用于DEBUG的输出函数,仅在DEBUG模式下有效
  130. def PrintHuman(self) -> None:
  131. pass
  132. def PrintButcher(self) -> None:
  133. pass
  134. def PrintProp(self) -> None:
  135. pass
  136. def PrintSelfInfo(self) -> None:
  137. pass
  138. # 屠夫阵营的特殊函数
  139. def Attack(self, angle: float) -> bool:
  140. pass
  141. def CarryHuman(self) -> bool:
  142. pass
  143. def ReleaseHuman(self) -> bool:
  144. pass
  145. def HangHuman(self) -> bool:
  146. pass
  147. # Timer用
  148. def StartTimer(self) -> None:
  149. pass
  150. def EndTimer(self) -> None:
  151. pass
  152. def Play(self, ai: IAI) -> None:
  153. pass