Михаил Капелько 4 months ago
parent
commit
a64f589a39
2 changed files with 23 additions and 2 deletions
  1. +21
    -0
      v5/gui_aux.py
  2. +2
    -2
      v5/main-gui.py

+ 21
- 0
v5/gui_aux.py View File

@@ -46,6 +46,27 @@ def gui_aux_cellGridPositions(
#} #}
#} #}


# Generate positions in cell dimensions for Harm game
def gui_aux_cellHarmPositions(
) -> [[int]]:
return [
[4, 6],
[9, 6],
[14, 6],
[19, 6],
[24, 6],
[29, 6],

[4, 12],
[9, 12],
[14, 12],

[4, 18],
[9, 18],
[14, 18],
]
#}

# Convert cell position to screen position # Convert cell position to screen position
def gui_aux_cellScreenPosition( def gui_aux_cellScreenPosition(
c: memory_Context, c: memory_Context,


+ 2
- 2
v5/main-gui.py View File

@@ -100,9 +100,9 @@ def process(c):
ctrl.registerCallback(process) ctrl.registerCallback(process)


ctrl.set("didLaunch", True) ctrl.set("didLaunch", True)
ctrl.set("playfieldSize", 2)
ctrl.set("playfieldSize", 6)


ctrl.set("cellPositions", gui_aux_cellGridPositions(2))
ctrl.set("cellPositions", gui_aux_cellHarmPositions())
ctrl.set("cellSize", 25) ctrl.set("cellSize", 25)
ctrl.set("deselectMismatchedTilesDelay", 500) ctrl.set("deselectMismatchedTilesDelay", 500)
ctrl.set("hideMatchingTilesDelay", 500) ctrl.set("hideMatchingTilesDelay", 500)


Loading…
Cancel
Save