#31 作りかけ
このコミットが含まれているのは:
@@ -0,0 +1,50 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import pygame
|
||||||
|
|
||||||
|
|
||||||
|
def main (
|
||||||
|
) -> None:
|
||||||
|
pygame.init ()
|
||||||
|
game = Game ()
|
||||||
|
while True:
|
||||||
|
deerjika = Deerjika (game)
|
||||||
|
|
||||||
|
|
||||||
|
class Game:
|
||||||
|
def __init__ (
|
||||||
|
self,
|
||||||
|
):
|
||||||
|
self.screen = pygame.display.set_mode ((CWindow.WIDTH, CWindow.HEIGHT))
|
||||||
|
self.clock = pygame.time.Clock ()
|
||||||
|
|
||||||
|
|
||||||
|
class Deerjika:
|
||||||
|
def __init__ (
|
||||||
|
self,
|
||||||
|
game: Game,
|
||||||
|
pattern: DeerjikaPattern = DeerjikaPattern.NORMAL,
|
||||||
|
direction: Direction = Direction.LEFT,
|
||||||
|
):
|
||||||
|
self.game = game
|
||||||
|
self.pattern = pattern
|
||||||
|
self.direction = direction
|
||||||
|
|
||||||
|
|
||||||
|
class DeerjikaPattern (Enum):
|
||||||
|
NORMAL = auto ()
|
||||||
|
RELAXED = auto ()
|
||||||
|
|
||||||
|
|
||||||
|
class Direction (Enum):
|
||||||
|
LEFT = auto ()
|
||||||
|
RIGHT = auto ()
|
||||||
|
|
||||||
|
|
||||||
|
class CWindow:
|
||||||
|
WIDTH = 1024
|
||||||
|
HEIGHT = 768
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main ()
|
||||||
新しい課題から参照
ユーザをブロックする