Skip to content

Latest commit

 

History

History

2024-02-10

Table of Content

Lecture 19: Build a Tic-Tac-Toe Game (part III)

Topics

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

Recap

Here is a highlight of the class activities

Course materials

  • slides [TBD]

Reading

  • tikinter tutorial [link]

Exercise / Exploration

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?