You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,9 @@ Most 3.5" TFT LCD Touch displays use the ILI9486 Display Driver and include a re
24
24
25
25
The program has been written using PlatformIO, and has been tested on the [Arduino UNO R3](https://docs.arduino.cc/hardware/uno-rev3/), [Arduino UNO R4 Minima](https://docs.arduino.cc/hardware/uno-r4-minima/) & [Arduino UNO R4 WiFi](https://docs.arduino.cc/hardware/uno-r4-wifi/).
26
26
27
+
> [!TIP]
28
+
> A detailed tutorial on how to use this repository is available at https://dumblebots.com/2024/08/05/using-3-5-tft-lcd-display-ili9486-arduino-part-6-tictactoe-game/. The tutorial includes a comprehensive explanation of the code and how to use it.
29
+
27
30
## Building/Uploading With PlatformIO
28
31
29
32
Since this project has been written using PlatformIO by default, simply run the following commands to fetch the libraries, build the project and upload the program -
@@ -52,10 +55,18 @@ Run the program given in [this](https://github.com/Aditya-A-garwal/Arduino-TFT-L
52
55
53
56
As soon as the program is uploaded, the display should turn black and a menu should appear, prompting the player to select between X and O.
54
57
58
+
||
59
+
|:-:|
60
+
|Starting Menu|
61
+
55
62
After an option is selected, the game begins. X moves first, followed by O, with the process repeating till a tie occurs or one of the players wins.
56
63
57
64
When a game is over, a line is drawn over the winning 3 pieces, followed by a game-over screen that announces the winner.
58
65
66
+
||||
67
+
|:-:|:-:|:-:|
68
+
|X wins|O wins|Draw|
69
+
59
70
For now, the moves chosen by the Arduino (opponent) are randomized, i.e. it will not follow a winning strategy. This means that if a player has a winning move that can be blocked by the Arduino, it may not necessarily pick that move. This is expected behavior.
60
71
Additionally, the random number generator always begins with the same seed, i.e. two games where the player plays the same moves will always end the same.
0 commit comments