Skip to content

Create tic-tac-toe-gui-in-python-using-pygame #150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AnishKr91620
Copy link
Contributor

This article will guide you and give you a basic idea of designing a game Tic Tac Toe using pygame library of Python. Pygame is a cross-platform set of Python modules designed for writing video games. It includes computer graphics and sound libraries designed to be used with the Python programming language. Let’s break the task in five parts:

Importing the required libraries and setting up the required global variables. Designing the game display function, that will set a platform for other components to be displayed on the screen. Main algorithm of win and draw
Getting the user input and displaying the “X” or “O” at the proper position where the user has clicked his mouse. Running an infinite loop, and including the defined methods in it.

This article will guide you and give you a basic idea of designing a game Tic Tac Toe using pygame library of Python. Pygame is a cross-platform set of Python modules designed for writing video games. It includes computer graphics and sound libraries designed to be used with the Python programming language. Let’s break the task in five parts:

Importing the required libraries and setting up the required global variables.
Designing the game display function, that will set a platform for other components to be displayed on the screen.
Main algorithm of win and draw
Getting the user input and displaying the “X” or “O” at the proper position where the user has clicked his mouse.
Running an infinite loop, and including the defined methods in it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants