Due to the way id is stored, the row function can be simplified. (try to do this without writing out the whole starting grid manually, it should be possible using ",".join(), str() and list comprehensions)Īlso it should be possible to modify the row/column/diagonals functions with 2D indices like grid, grid, grid, etc. maybe you could write the coordinates in the empty cells like X | 1,2 | O Ok, I'll admit this is a little annoying for the players. Any criticisms or pointers are welcome! class TicTacToe: For this tiles like these, I just laid them on the grass.I've been teaching myself Python and decided to make a Tic Tac Toe game for a bit of practice. If my tiles were a bit thicker, I would carve away the grass and bed them down. Lay out your square tiles or pavers in a 3-by-3 grid. I made six of each because, with a toddler who helps in the garden, things tend to disappear. To play a game of tic-tac-toe you will need five of each marker. Use the white acrylic paint to mark half your stones with O’s and half with X’s. You guys know how I love spray painting rocks, right? Give your tic-tac-toe stones a good coat of dark, textured spray paint and let dry.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |