def __init__(self, game=None):
self.game = game or ChessGame()
self.width, self.height = ui.get_screen_size()
assert self.width > self.height, 'This app only works in landscape mode!!'
if photos.is_authorized(): # add a photo as the background image
self.add_subview(self.make_image_view())
center_frame, left_frame, right_frame, status_frame = screen_frames()
self.add_subview(self.make_left_side_view(left_frame))
self.make_buttons(left_frame)
self.add_subview(self.make_board_scene(center_frame))
self.info_view = self.make_right_side_view(right_frame)
self.add_subview(self.info_view)
self.status_view = self.make_status_view(status_frame)
self.add_subview(self.status_view)
self.present(orientations=['landscape'], hide_title_bar=True)
评论列表
文章目录