@@ -47,12 +47,14 @@ def gui_generateTilePositions( | |||||
) -> memory_Context: | ) -> memory_Context: | ||||
if ( | if ( | ||||
( | ( | ||||
c.recentField != "cellPositions" and | |||||
c.recentField != "cellSize" and | c.recentField != "cellSize" and | ||||
c.recentField != "playfieldSize" and | c.recentField != "playfieldSize" and | ||||
c.recentField != "windowHeight" and | c.recentField != "windowHeight" and | ||||
c.recentField != "windowWidth" | c.recentField != "windowWidth" | ||||
) or | ) or | ||||
( | ( | ||||
len(c.cellPositions) == 0 or | |||||
c.cellSize == 0 or | c.cellSize == 0 or | ||||
c.playfieldSize == 0 or | c.playfieldSize == 0 or | ||||
c.windowHeight == 0 or | c.windowHeight == 0 or | ||||
@@ -63,11 +65,9 @@ def gui_generateTilePositions( | |||||
return c | return c | ||||
#} | #} | ||||
positions = gui_aux_cellPositions(c.playfieldSize) | |||||
ps = [] | ps = [] | ||||
for i in range(0, len(positions)): | |||||
p = gui_aux_cellScreenPosition(c, positions[i]) | |||||
for i in range(0, len(c.cellPositions)): | |||||
p = gui_aux_cellScreenPosition(c, c.cellPositions[i]) | |||||
ps.append(p) | ps.append(p) | ||||
#} | #} | ||||
@@ -8,6 +8,7 @@ from desktop_Platform import * | |||||
from desktop_SequentialTimer import * | from desktop_SequentialTimer import * | ||||
from desktop_Window import * | from desktop_Window import * | ||||
from gui import * | from gui import * | ||||
from gui_aux import * | |||||
from gui_aux_test import * | from gui_aux_test import * | ||||
from gui_test import * | from gui_test import * | ||||
from llm_test import * | from llm_test import * | ||||
@@ -101,6 +102,7 @@ ctrl.registerCallback(process) | |||||
ctrl.set("didLaunch", True) | ctrl.set("didLaunch", True) | ||||
ctrl.set("playfieldSize", 2) | ctrl.set("playfieldSize", 2) | ||||
ctrl.set("cellPositions", gui_aux_cellPositions(2)) | |||||
ctrl.set("cellSize", 25) | ctrl.set("cellSize", 25) | ||||
ctrl.set("deselectMismatchedTilesDelay", 500) | ctrl.set("deselectMismatchedTilesDelay", 500) | ||||
ctrl.set("hideMatchingTilesDelay", 500) | ctrl.set("hideMatchingTilesDelay", 500) | ||||
@@ -1,5 +1,6 @@ | |||||
class memory_Context: | class memory_Context: | ||||
def __init__(self): | def __init__(self): | ||||
self.cellPositions = [] | |||||
self.cellSize = 0 | self.cellSize = 0 | ||||
self.deselectMismatchedTiles = False | self.deselectMismatchedTiles = False | ||||
self.deselectMismatchedTilesDelay = 0 | self.deselectMismatchedTilesDelay = 0 | ||||