伊地知ニジカ放送局だぬ゛ん゛. https://www.youtube.com/@deerjika
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test.py 892 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. from __future__ import annotations
  2. import pygame
  3. def main (
  4. ) -> None:
  5. pygame.init ()
  6. game = Game ()
  7. while True:
  8. deerjika = Deerjika (game)
  9. class Game:
  10. def __init__ (
  11. self,
  12. ):
  13. self.screen = pygame.display.set_mode ((CWindow.WIDTH, CWindow.HEIGHT))
  14. self.clock = pygame.time.Clock ()
  15. class Deerjika:
  16. def __init__ (
  17. self,
  18. game: Game,
  19. pattern: DeerjikaPattern = DeerjikaPattern.NORMAL,
  20. direction: Direction = Direction.LEFT,
  21. ):
  22. self.game = game
  23. self.pattern = pattern
  24. self.direction = direction
  25. class DeerjikaPattern (Enum):
  26. NORMAL = auto ()
  27. RELAXED = auto ()
  28. class Direction (Enum):
  29. LEFT = auto ()
  30. RIGHT = auto ()
  31. class CWindow:
  32. WIDTH = 1024
  33. HEIGHT = 768
  34. if __name__ == '__main__':
  35. main ()