MCPcopy Index your code
hub / github.com/ndleah/python-mini-project / drawBoard

Function drawBoard

Chess_Game/ChessGame.py:113–119  ·  view source on GitHub ↗
(screen)

Source from the content-addressed store, hash-verified

111 drawPieces(screen, gs.board)
112
113def drawBoard(screen):
114 global colors
115 colors = [p.Color("white"), p.Color("grey")]
116 for r in range(DIMENSIONS):
117 for c in range(DIMENSIONS):
118 color = colors[(r+c) % 2]
119 p.draw.rect(screen, color, p.Rect(c*SQ_SIZE, r*SQ_SIZE, SQ_SIZE, SQ_SIZE))
120
121def drawPieces(screen, board):
122 for r in range(DIMENSIONS):

Callers 2

drawGameStateFunction · 0.85
animatedMovesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected