Compare commits

..

3 Commits

Author SHA1 Message Date
d66ec02d68 + etc 2026-01-03 12:35:31 +03:00
9afd997a2e + pddnsc submodule 2026-01-03 12:35:12 +03:00
d88d3af47e phantomcastle: set_mode FULLSCREEN commented 2026-01-03 12:33:56 +03:00
5 changed files with 38 additions and 1 deletions

11
chunker.py Normal file
View File

@@ -0,0 +1,11 @@
def chunker(it, n):
it = iter(it)
while 1:
chunk = tuple(x[1] for x in zip(range(n), it))
if not chunk:
break
yield chunk
for chunk in chunker(range(25), 4):
print(list(chunk))

24
my_range_gen_3.py Normal file
View File

@@ -0,0 +1,24 @@
from operator import gt, lt
def my_range_gen(start, stop=None, step=1):
if stop is None:
start, stop = 0, start
if (
not step
or start == stop
or (step > 0 and start > stop)
or (step < 0 and start < stop)
):
return
x, op = start, start > stop and gt or lt
while op(x, stop):
yield x
x += step
for i in my_range_gen(20, 10, 3):
print(i)
print("End")

1
pddnsc Submodule

Submodule pddnsc added at 5e3805b567

View File

@@ -31,7 +31,7 @@ class Scene(DrawableGameObject, EventHandler):
box_sz = screen_sz // get_maze_sz(self.maze)
self.box_sz = box_sz
self._surface = pygame.display.set_mode(screen_sz)
self._surface = pygame.display.set_mode(screen_sz) #pygame.display.set_mode(screen_sz, pygame.FULLSCREEN) #pygame.display.set_mode(screen_sz)
self.surface.fill("white")
self.rect = self.surface.get_rect()
self.background = pygame.image.load(self.assets["bg1k.png"]).convert_alpha()

View File

@@ -38,6 +38,7 @@ async def game(assets):
maze_sz = Coords(6, 6)
coins_count = 10
pygame.display.set_caption("Призрачный лабиринт: сокровища небесного замка")
#pygame.display.set_mode((0, 0), pygame.FULLSCREEN)
total_levels = 0
total_coins = 0