Tic-Tac-Toe Simulation (15%)
- Demo Due Date: Friday, July 28th during class.
- Code Submission Due Date: Friday, July 28th no later than 1300.
- Partner Information: Complete this assignment individually.
- Submission Instructions: E-mail
the solution file to john.paxton@montana.edu
Assignment
Familiarize yourself with the rules of
tic-tac-toe
and then implement a simulated tic-tac-toe game in the
Godot Engine using GDScript.
Sample Output Transcript
--- Debugging process started ---
Godot Engine v4.0.3.stable.official.5222a99f5 - https://godotengine.org
Vulkan API 1.2.203 - Forward+ - Using Vulkan Device #0: Intel - Intel(R) UHD Graphics 620
| |
--+---+--
| |
--+---+--
| |
| |
--+---+--
| | X
--+---+--
| |
| |
--+---+--
| | X
--+---+--
| | O
| | X
--+---+--
| | X
--+---+--
| | O
| | X
--+---+--
| | X
--+---+--
O | | O
| | X
--+---+--
| X | X
--+---+--
O | | O
| | X
--+---+--
| X | X
--+---+--
O | O | O
O wins!
Requirements
- Each time the simulation is run, one complete game is played.
- Each move should be determined randomly, with all legal plays
being equally likely.
- An understandable text-based representation of the board is printed
each time a move is made.
- When the game is finished, an appropriate message is
printed to indicate whether X won, O won, or the game was a draw.
Grading
- 80 points - Correctness.
- 20 points - The solution is high quality and contains
comments.
Sample Solution