title: Tic-tac-toe grid gui in python pyglet
body: <pre><code>import pyglet
  from pyglet import shapes
  
  title = &quot; Tic-tac-toe &quot;
  
  window = pyglet.window.Window(500,500, title)
  batch = pyglet.graphics.Batch()
  
  def drawBoard(shape_list, batch=None):
      for i in range(100, 600, 100):
          linex = shapes.Line(i, 1, i, 600, width=3, color=(0, 230, 0), batch=batch)
          linex.opacity = 400
          shape_list.append(linex)
          liney = shapes.Line(1, i, 600, i, width=3, color=(0, 230, 0), batch=batch)
          liney.opacity = 400
          shape_list.append(liney)
  
  shape_list = []
  drawBoard(shape_list, batch=batch)
  
  @window.event
  def on_draw():
      window.clear()
      batch.draw()
  
  
  
  pyglet.app.run()
  </code></pre>
  <p>trying to make a tic-tac-toe grid in python pyglet but, I get this and am not able to make a grid of tic-tac-toe this problem is like a fishbone in my neck.</p>
  <p><a href="https://i.stack.imgur.com/k2dsE.png" rel="nofollow noreferrer">this is the output of my code</a></p>