# ==============================================================================
"""GRID : create some grids with several color or black/white patterns"""
# ==============================================================================
__author__  = "Christophe Schlick modified by Philippe Blasi"
__version__ = "0.0" # skeleton version
__date__    = "2022-11-12"
# ==============================================================================
from ezTK import *
# ------------------------------------------------------------------------------
def stripes(width:int=400, height:int=400, rows:int=40) -> None:
  """alternate black and white horizontal stripes"""
  win = Win(title='STRIPES') # create the main window
  colors = ('#000','#FFF') # store black and white colors in a tuple
  Brick(win, width=width, height=height, bg=colors[0]) # create single Brick
  # TODO (replace the single Brick by a loop, to create one Brick per stripe)
  win.loop() # start interaction loop
# ------------------------------------------------------------------------------
def colorstripes(width:int=400, height:int=400, rows:int=40) -> None:
  """alternate color stripes using six colors"""
  win = Win(title='COLORSTRIPES')
  # TODO
  win.loop()
# ------------------------------------------------------------------------------
def chessboard(width:int=400, height:int=400, cols:int=8, rows:int=8) -> None:
  """create black and white chessboard"""
  win = Win(title='CHESSBOARD')
  # TODO
  win.loop()
# ------------------------------------------------------------------------------
def colorboard(width:int=400, height:int=400, cols:int=8, rows:int=8) -> None:
  """create six color checkerboard"""
  win = Win(title='COLORBOARD')
  # TODO
  win.loop()
# ------------------------------------------------------------------------------
def boxes(width:int=400, height:int=400, cols:int=13, rows:int=13) -> None:
  """create concentric black and white boxes"""
  win = Win(title='BOXES')
  # TODO
  win.loop()
# ------------------------------------------------------------------------------
def colorboxes(width:int=400, height:int=400, rows:int=13, cols:int=13) -> None:
  """create concentric color boxes"""
  win = Win(title='COLORBOXES')
  # TODO
  win.loop()
# ==============================================================================
if __name__ == "__main__":
  stripes()
  #colorstripes()
  #chessboard()
  #colorboard()
  #boxes()
  #colorboxes()
# ==============================================================================
