From 14a9c0334edc0c5b5fda65b4ead7f5828783f0a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Sun, 30 Jun 2024 22:39:51 +0300 Subject: [PATCH] d --- v5/gui_aux.py | 4 ++-- v5/gui_aux_test.py | 10 +++++----- v5/gui_test.py | 1 + v5/main-gui.py | 4 ++-- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/v5/gui_aux.py b/v5/gui_aux.py index d525b44..491f0e1 100644 --- a/v5/gui_aux.py +++ b/v5/gui_aux.py @@ -1,11 +1,11 @@ from memory_Context import * -# Generate positions in cell dimensions +# Generate grid positions in cell dimensions # # Conditions: # 1. 2x2 grid # 2. 4x4 grid -def gui_aux_cellPositions( +def gui_aux_cellGridPositions( size: int ) -> [[int]]: if ( diff --git a/v5/gui_aux_test.py b/v5/gui_aux_test.py index 7ed4fbf..393ed94 100644 --- a/v5/gui_aux_test.py +++ b/v5/gui_aux_test.py @@ -1,15 +1,15 @@ from gui_aux import * -def test_gui_aux_cellPositions( +def test_gui_aux_cellGridPositions( ) -> str: - items2x2 = gui_aux_cellPositions(2) - items4x4 = gui_aux_cellPositions(4) + items2x2 = gui_aux_cellGridPositions(2) + items4x4 = gui_aux_cellGridPositions(4) if ( len(items2x2) == 4 and len(items4x4) == 16 ): - return "OK: gui_aux_cellPositions" + return "OK: gui_aux_cellGridPositions" #} - return "ERR: gui_aux_cellPositions" + return "ERR: gui_aux_cellGridPositions" #} diff --git a/v5/gui_test.py b/v5/gui_test.py index 70c1cf9..fcad14f 100644 --- a/v5/gui_test.py +++ b/v5/gui_test.py @@ -32,6 +32,7 @@ def test_gui_generateTilePositions( c.cellSize = 10 c.playfieldSize = 2 + c.cellPositions = gui_aux_cellGridPositions(c.playfieldSize) c.windowHeight = 200 c.windowWidth = 200 c.recentField = "windowWidth" diff --git a/v5/main-gui.py b/v5/main-gui.py index 3a28b33..23d2179 100644 --- a/v5/main-gui.py +++ b/v5/main-gui.py @@ -52,7 +52,7 @@ print(cli_test_reportMatchedItems()) print(cli_test_reportMismatchedItems()) print(cli_test_reportVictory()) -print(test_gui_aux_cellPositions()) +print(test_gui_aux_cellGridPositions()) print(test_gui_generateTextureDescriptions()) print(test_gui_generateTilePositions()) @@ -102,7 +102,7 @@ ctrl.registerCallback(process) ctrl.set("didLaunch", True) ctrl.set("playfieldSize", 2) -ctrl.set("cellPositions", gui_aux_cellPositions(2)) +ctrl.set("cellPositions", gui_aux_cellGridPositions(2)) ctrl.set("cellSize", 25) ctrl.set("deselectMismatchedTilesDelay", 500) ctrl.set("hideMatchingTilesDelay", 500)