Table of Content
In this class, we'll continue our journey building the tic-tac-toe game. The goal is to build a graphic user interface (GUI) for the game.
Here are the topics we are going to cover
- Build a graphic interface to collect user input
- Consume the user input in backend code logic
- Build a 3x3 grid to mimic the tic-tac-toe game board
Here is a highlight of the class activities
- Tic-tac-toe logic enhancement to capture scenarios on quit/reset the game
- Play with
tkinter
on creating a GUI and add widgets - Build a logic to react to button click events
- onclick.py
- onclick2.py - didn't quite finish
- slides [TBD]
tikinter
tutorial [link]
Q1. We've done some practice to implement a graphic interface with tkinter
and we are able to build a graphic tic-tac-toe board. However, there are still some features missing, such as
- Button displays different text information unpon user click
Can you do some research to figure out a way to make this happen?
- Hint: maybe try the global variable idea we discussed near the end of the class?
Q2. Can you rewrite the tic-tac-toe game logic in tic_tac_toe_v1.py in a Python class
?