This repository contains a Discord Bot which allows you to play TicTacToe against other players or an AI using an straightforward interface (TicTacToe.Discord).
It also contains a simple TicTacToe library (TicTacToe.Game) and a CLI which allows you to play TicTacToe against a very bad AI (TicTacToe.Cli).
You can add the bot to your server via this link: https://discord.com/api/oauth2/authorize?client_id=899279391346016286&permissions=137439341632&scope=bot%20applications.commands
Alternatively you can download the latest release from the Releases tab and host it yourself.
Make sure to provide the settings via environment variables or through the appsettings.json file.
You can also run this app in a docker container, a Dockerfile is already ready to be used.
- Adjust the settings
- Invite the bot to your server
- Use the
/tictactoe
command to start a game of Tic Tac Toe against the AI or/tictactoe @opponent
to start a game of Tic Tac Toe against another player. - Example:
/tictactoe @Dusty
- Open the solution with Visual Studio 2022
- Build the solution
- (Optional) Publish the solution
dotnet restore "TicTacToe.Discord/TicTacToe.Discord.csproj"
dotnet build "TicTacToe.Discord/TicTacToe.Discord.csproj" -c Release
- (Optional)
dotnet publish "TicTacToe.Discord/TicTacToe.Discord.csproj" -c Release
Output directory: TicTacToe.Discord\TicTacToe.Discord\bin\Release\net5.0
Publish directory: TicTacToe.Discord\TicTacToe.Discord\bin\Release\net5.0\publish
This project uses the following open-source projects:
TicTacToe is licensed under the MIT License, see LICENSE.txt for more information.