This is a fully fledged 2 or 1 player tic-tac-toe game written in TypeScript, HTML and SCSS using Ionic Framework and uses Cordova for the Android app.
This app uses minimax algorithm with alpha beta pruning for Single Player mode.
It can be exported to Android, iOS, Windows, MacOS, PWA or a Web App.
-
Can be played online in the browser. See Play Online
-
Can be installed as a Progressive Web App on any platform. See Use Progressive Web Apps
-
Can be installed as an Android app. See Downloads
-
Clone this repository
-
Set current working directory to tic-tac-toe
-
Run
npm install
- This will install all the required packages
-
Set current working directory to tic-tac-toe
-
Run
ionic serve
- This will compile the program and run it on
http://localhost:8100
(port may vary) to use on your browser
-
Set current working directory to tic-tac-toe
-
To export as an Android app run
ionic cordova build android
-
This will export a debug build of the apk file which can be installed on an Android phone or emulator
-
Minimum Android Version Required : Android 7.0 Nougat (API Level 24)
-
2 modes namely Single Player (1P) and Multi Player (2P)
-
Default mode is Single Player
-
Button to change the mode
-
Label showing current mode
-
In 1P mode, user always inputs X and the computer inputs O
-
Start Button to let Computer start first
-
Uses Minimax algorithm with Alpha Beta Pruning for an unbeatable Computer
-
In 2P mode, input X and O alternatively by clicking on the buttons in the grid
-
First to start is X
-
Label showing which is the next player in 2P mode
-
Alert Box shows you who won or if it's a draw
-
Button to Restart Game
-
Labels showing scores of X, O and Draws
-
Pull to Refresh or Change Mode to reset scores and restart game
-
Dark theme and Light theme with toggle
-
About page with version and links for developer's GitHub profile, releases, README, source code, license
-
Third Party Licenses page
-
Default theme on first run is Dark
-
Material Design
-
Animated Splash Screen
- If you face any issue then feel free to open an issue on GitHub