- Setup and Run the program
- Show changes from Chrome to applications
- Design Program
- Algorithm
- Technologies
- ติดตั้ง Setup Flutter
- Clone git
git clone https://github.com/minaq575/My-Xogame.git
- Install dependencies
flutter pub get
- Run the program
flutter run -d chrome
Overview of the flowchart work process
Input name
When entering the game page, players must enter their name. If not, an error message will appear when the start button is pressed. If they press OK They'll go to the Yes, enter a name step, and when they're done. Press the start button. To go to the main game page, the name will be displayed after the word player. End.
Select grid
When entering the main game page You will need to decide whether to choose a grid size or not. If no, you can start playing in the section showing the default size 3*3, but if yes is selected, enter the desired numbers 3-9. Once selected, press the button. Set the grid size. The size will update and display the grid size.
Check the gaps and Check wins or nobody wins
When starting to play the game The player clicks play in the grid and input O. To display O in the table, AI will automatically click and input X to display X in the table. When playing is finished, the system will check for gaps if there are no gaps. It will display the message nobody wins! End. If there are spaces, go towards yes. Check the row, check the column, check the main diaginals, check the secondary diaginals, see if it's O or X. Is the sequence complete or are there still gaps? If no, go back and check again. If yes, go to check if it's a win or not. If no, it will show nobody wins! But if yes, it will show the message Player (O or X ) Wins! End.
View history
When players and AI place O or X in the grid, update the game history. Let the player decide whether to view the history. If not, the game ends. If yes, press a button to enter the history screen. The history screen shows the game data for X and O.- Flutter v3.22.2
- Dart v3.4.3
- DevTools v2.34.3
- Android Studio v2022.2
- Android SDK v 34.0.0
- VS Code v1.91.1
- Visual Studio Community 2022 v.17.10.3
Thank you. Napassorn Kemkrathok