本文整理汇总了Python中interface.Interface.set_information方法的典型用法代码示例。如果您正苦于以下问题:Python Interface.set_information方法的具体用法?Python Interface.set_information怎么用?Python Interface.set_information使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类interface.Interface
的用法示例。
在下文中一共展示了Interface.set_information方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from interface import Interface [as 别名]
# 或者: from interface.Interface import set_information [as 别名]
class Game:
def __init__(self, size, manager=None, player_one=None,
player_two=None, rnd=1, online=None):
self.size = size
self.manager = manager
if manager is not None:
self.manager.load_images(size)
self.interface = Interface(size,
self.manager.img_dict,
self.manager.options)
self.person = 1
self.online = online
self.end = False
self.message = None
self.players = {1-2*rnd: player_one, -1+2*rnd: player_two}
self.points = {-1: 2, 1: 2}
self.active = False
self.load = 0
self.field = [[0] * size for i in range(size)]
self.size = size
if manager is not None:
self.interface.set_information(self.points, self.person, self.players)
def is_end(self):
return self.end
def the_end(self):
self.end = True
def descend(self, x, y):
pass
def get_valid_path(self):
pass
def start(self):
pass
def event(self, events):
pass
def update(self, dt):
if not self.active:
if self.load <= PASSIVE:
self.load += dt
else:
self.active = True
def draw(self, display):
path = self.valid_path if (self.players[self.person] == Player.man) \
else {}
self.interface.draw(display, self.field, path)