Module pacai.ui.capture.view
Expand source code
from pacai.ui.view import AbstractView
from pacai.ui.capture.frame import CaptureFrame
class CaptureAbstractView(AbstractView):
"""
A abstract view for capture.
Knows how to create capture frames.
"""
def __init__(self, **kwargs):
super().__init__(**kwargs)
# Override
def _createFrame(self, state):
return CaptureFrame(self._frameCount, state, self._turnCount)
Classes
class CaptureAbstractView (**kwargs)
-
A abstract view for capture. Knows how to create capture frames.
Expand source code
class CaptureAbstractView(AbstractView): """ A abstract view for capture. Knows how to create capture frames. """ def __init__(self, **kwargs): super().__init__(**kwargs) # Override def _createFrame(self, state): return CaptureFrame(self._frameCount, state, self._turnCount)
Ancestors
- AbstractView
- abc.ABC
Subclasses
Methods
def finish(self)
-
Inherited from:
AbstractView
.finish
Signal that the game is over and the UI should cleanup.
def getKeyboard(self)
-
Inherited from:
AbstractView
.getKeyboard
For views that support keyboards, get an instance of a pacai.ui.keyboard.Keyboard.
def initialize(self, state)
-
Inherited from:
AbstractView
.initialize
Perform an initial drawing of the view.
def update(self, state, forceDraw=False)
-
Inherited from:
AbstractView
.update
Materialize the view, given a state.