Skip to content

minaq575/My-Xogame

Repository files navigation

Xo Game

This project creates the game "XO" on the Flutterplatform written in Dart language.

Table of Contents

Setup and Run the program

  1. ติดตั้ง Setup Flutter
  2. Clone git git clone https://github.com/minaq575/My-Xogame.git
  3. Install dependencies flutter pub get
  4. Run the program flutter run -d chrome

Show changes from Chrome to applications

2024-07-13-16-39-33

Design Program

Overview of the flowchart work process

Algorithm

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.

Technologies

Thank you. Napassorn Kemkrathok

About

Xo Game By Dart Language Mobile (flutter)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published