from memory_Context import *

# Generate grid positions in cell dimensions
#
# Conditions:
# 1. 2x2 grid
# 2. 4x4 grid
def gui_aux_cellGridPositions(
  size: int
) -> [[int]]:
  if (
    size == 2
  ):
    return [
      [14, 7],
      [19, 7],
      [14, 13],
      [19, 13],
    ]
  #}

  if (
    size == 4
  ):
    return [
      [9, 1],
      [14, 1],
      [19, 1],
      [24, 1],

      [9, 7],
      [14, 7],
      [19, 7],
      [24, 7],

      [9, 13],
      [14, 13],
      [19, 13],
      [24, 13],

      [9, 19],
      [14, 19],
      [19, 19],
      [24, 19],
    ]
  #}
#}

# 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
def gui_aux_cellScreenPosition(
  c: memory_Context,
  pos: [int]
) -> [int]:
  x = pos[0] * c.cellSize
  y = c.windowHeight - pos[1] * c.cellSize
  return [x, y]
#}
