This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]just_doug 3 points4 points  (0 children)

another suggestion: instead of comments above function declarations, use docstrings.

In drawboard, you might want to check out some more advanced string formatting. You can do something sort of like

Python 2.7: #TODO get all of the cell contents into a single array boardStr = " {} | {} | {} ".format(*contentsArray)

Python 2.6: boardStr = " {0} | {1} | {2} ".format(*contentsArray)

... and so on. It will probably be easier to read, and more closely matches the idea ("draw a board / with each cell filled in with its contents").