title: Generating a Board in python for a table game
body: <p>I have to generate a board like this in python.</p>
  
  <p>This is the desired outcome:</p>
  
  <pre><code>  0 1 2 3 4 5 6 7 8 9 0 1 2
  0           * * *          
  1           * D *          
  2           * D *          
  3           * D *          
  4           * D *          
  5 * * * * * * D * * * * * *
  6 * D D D D D D D D D D D *
  7 * * * * * * D * * * * * *
  8           * D *          
  9           * D *          
  0           * D *          
  1           * D *          
  2           * * *          
  </code></pre>
  
  <p>So far I got this done :</p>
  
  <pre><code>  0 1 2 3 4 5 6 7 8
  0 * * * * * * * * *
  1 * * * * * * * * *
  2 * * * * * * * * *
  3 * * * * * * * * *
  4 * * * * * * * * *
  5 * * * * * * * * *
  6 * * * * * * * * *
  7 * * * * * * * * *
  8 * * * * * * * * *
  </code></pre>
  
  <p>Here is my code so far:</p>
  
  <pre><code>def makeboard(x):
    board = []
    for r in range(x+1):
       brow = []
       for c in range(x+1):
          if r == c == 0:
               brow.append(' ')
          elif r == 0:
              brow.append(str(c-1))
          elif c == 0:
              brow.append(str(r-1))
          else:
               brow.append('*')
        board.append(brow)
    return board
  
  b =makeboard(9)
  
  for x in b:
  print(‘ ‘.join(x))
  </code></pre>
  
  <p>My first problem is, that if I want to make a board like 12x12 the numbers in the first row and on the side over 9 push my board off symmetry. So I would like to make them reset over 9 so they start again from 0. I need help in this.
  My second problem is I can’t make my board like I need to generate. Hoping for some tips. </p>