From 1ef83eb6ae0632c41ff7eae33b6b7fdff16de1da Mon Sep 17 00:00:00 2001 From: Traumi-Schlumpf Date: Wed, 11 Mar 2026 22:29:12 +0100 Subject: [PATCH] Use 800x800 window, set icon and caption Load a new window icon and switch the display to an 800x800 window with caption "Schach". Update Brett initialization to place the board at (0,0) instead of centered, and adjust related variables (width/height). Add assets/graphics/icon.png to be used as the window icon. Minor cleanup: add a comment about why rotation handling is outside the class and remove extra blank lines. --- Brett.py | 18 ++++++++++-------- assets/graphics/icon.png | Bin 0 -> 574 bytes 2 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 assets/graphics/icon.png diff --git a/Brett.py b/Brett.py index 9fbf7dc..bd6589b 100644 --- a/Brett.py +++ b/Brett.py @@ -1725,16 +1725,21 @@ def getFieldByCords(self, pos:tuple[int, int])->Feld|None: if __name__ == "__main__": pygame.init() - screen = pygame.display.set_mode((1920, 1080)) - pygame.display.set_caption('Brett Test') + icon = pygame.image.load("assets/graphics/icon.png") + width = 800 + height = width + screen = pygame.display.set_mode((width, height)) + + pygame.display.set_caption('Schach') + pygame.display.set_icon(icon) clock = pygame.time.Clock() TestBrettGroup = pygame.sprite.GroupSingle() - Spielbrett = Brett(800, (1920/2-400, 1080/2-400), "#eeeed1", "#739754") + Spielbrett = Brett(800, (0, 0), "#eeeed1", "#739754") TestBrettGroup.add(Spielbrett) - + # Theoretisch in die Klasse einbaubar, jedoch dagegen entschieden. while True: screen.fill((30,30,30)) for event in pygame.event.get(): @@ -1759,7 +1764,4 @@ def getFieldByCords(self, pos:tuple[int, int])->Feld|None: TestBrettGroup.draw(screen) TestBrettGroup.update() pygame.display.update() - clock.tick(60) - #Spielbrett.setRotation(int(input())) - - + clock.tick(60) \ No newline at end of file diff --git a/assets/graphics/icon.png b/assets/graphics/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..f6f4992a99a9d5f01a4346ad8fdba544dcffab99 GIT binary patch literal 574 zcmV-E0>S->P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0nTQdUZdKm%$+&|pO&@7ue@E5G=070Et zvvXo~2b}9+t%bFAlMhx2aIS|j1|bB55H^XZ3UIDZYbmGWm{yHj833EDwKj_#4j(C| zK?V75z4t)DE13zYy#Ua4U5eAS_a4TW$vwJH_jo?P_TFbACIYCqd^m>}qC738L3vz6 z)dO4Ux-P9@7}6*>sRJ#$Cqf8Wo)(j6qsTfCLXe>ht&kRzXwRMqh%q9@h+!DijR2R#{eGVo8L0+09G#FYU7U0Pq6^wiG$B;9 z1UH{N$T9(7r0z`uem%yyvkJ+F;q&Ul=v0Ij&z1%kh-ttM<9fiWf>N+o#V+PT1K z7SIZb;A5!KEFi{M+?6a!tA(luQ1HPLYV${nfH_{CUS((z%_F!LzuKV=_G}%;k^lez M07*qoM6N<$f)FY22mk;8 literal 0 HcmV?d00001