Skip to content

zohreh-deriv/tic_tac_toe

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tic Tac Toe in Dart

This is a simple Tic Tac Toe game implemented in Dart programming language. It includes a basic command-line interface for playing against an AI player that uses the minimax algorithm to choose its moves.

How to Play

To play the game, run the following command in your terminal:

dart run tic_tac_toe.dart
dart run tic_tac_toe_ai.dart
dart run tic_tac_toe_ai_smart.dart

The game will ask you to choose a row and a column to place your marker (X or O) on the board. The rows and columns are numbered 1, 2, and 3. Once you've made your move, the AI player will automatically make its move.

The game will continue until either one player wins, the game ends in a tie, or you interrupt the program with Ctrl-C.

How to Run

To run the program, you must have Dart SDK installed on your system. You can download and install the Dart SDK from the official website: https://dart.dev/get-dart

Once you have the Dart SDK installed, navigate to the project directory in your terminal and run the following command:

dart run tic_tac_toe.dart
dart run tic_tac_toe_ai.dart
dart run tic_tac_toe_ai_smart.dart

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 39.5%
  • Dart 31.1%
  • CMake 17.7%
  • HTML 9.3%
  • C 1.0%
  • Swift 1.0%
  • Other 0.4%