Hi all,
The continuing quest to master Tkinter has led to this implementation of the dots and boxes game. The rules are well-known: each player gets to create a new line between two dots (single-click near the line you wish to create). If a player creates a box, he gets a point *and* gets to go again. (Two boxes gets two points, but only one extra turn.) The highest score out of 81 boxes wins!
Dots and Boxes is a perfect game for these situations. All you need is a pencil and paper (or a crayon and the back of a kid's menu). Of course, knowing me, I've found all sorts of deeper math in this simple game. But first let's just take a look at how the game is played. A player that completes the fourth side of a square (a box) colors that box and must play again. When all boxes have been colored, the game ends and the player who has colored more boxes wins. You are playing against the computer. The computer is red; you are blue.
Please feel free to mercilessly criticize the UI or the code; I'm looking to improve it and submit to the Code Snippets thread.
Thanks,
Jeff
P.S. Anyone know how to make canvas text be semi-transparent?
- 5 Contributors
- forum5 Replies
- 2,701 Views
- 11 Years Discussion Span
- commentLatest PostLatest Postby Jiten_1
Recommended Answers
At first glance and play --> nice game, but I would like to know which player's turn it is. You could put that into the title, or color the line for each player (red or blue).
Jump to PostAll 5 Replies
At first glance and play --> nice game, but I would like to know which player's turn it is. You could put that into the title, or color the line for each player (red or blue).
A Fun Car Travel Game
Here’s how to play this fun easy game that you may have played in middle school! It’s a fantastic game to play in the car on a road trip. This is a game for two or more people.
Free Printable game pages
Use page 1 for older kids, and the easy page for preschoolers (fewer dots). Click the picture to print a full sized page:
How to Play:
1. Print the template above, OR make your own game board, using a blank sheet of paper and fill a section of it (or the whole thing) with evenly spaced rows of dots about half an inch apart.
2. Start the game. Take turns drawing horizontal or vertical lines between adjacent dots connecting them together. No diagonals!
3. If you complete a full square, write your initial in the box and take 1 extra turn. If your line creates two boxes, then you get to put your initial in both of them (you only get 1 extra turn though). Some strategy will be involved to see if you can create more boxes than your opponent.
4. Continue playing until all the dots on the page are connected.
How To Play Dots And Boxes On Game Pigeon Forge
5. Count how many boxes each player has on the page. The player with the most boxes wins!
Example:
Here is a sample lines and dots game that is just getting started:
Tips: Use a smaller section of the page with fewer dots for younger children and more dots for older children – maybe even the whole page if you really want to get crazy!
How To Play Dots And Boxes On Game Pigeon Mo
Don’t miss all the FREE printable travel games at Momsminivan!