TicTacToe 1.0.0

The best and first open source library for the logic of Tic Tac Toe game, with Test project.

Install-Package TicTacToe -Version 1.0.0
dotnet add package TicTacToe --version 1.0.0
<PackageReference Include="TicTacToe" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add TicTacToe --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: TicTacToe, 1.0.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install TicTacToe as a Cake Addin
#addin nuget:?package=TicTacToe&version=1.0.0

// Install TicTacToe as a Cake Tool
#tool nuget:?package=TicTacToe&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Tic Tac Toe Library

The best and first open-source library for the logic of the Tic Tac Toe game.
Easy to use, with test/example project on GitHub Repositority

How to start a new game instance?

Just create a new instance of the TicTacToe class.
TicTacToeInstance ttt = new TicTacToeInstance();

How can I get current board info?

The board is a property of the TicTacToeInstance class.
It called BoardState, and it's array of array of BoardStateOption enum which can be Undefined if nothing in this field, X if the X player selected it, or O if the O player selected it. Full example of the BoardState is: ttt.BoardState[0][1], in this example we are getting the second column in the first row.

Can I change the board state as I want

No, you can't.

O'k, the player know where he want to put, what to do?

ttt.MakeOperation(row, column);, indexes base-zero.
This will return null if the game isn't finished or WinnerOption if the game finished.
WinnerOption can be: X, O, Tie

The game is finished, what's next?

Nothing, you can kill this instance, you can't do anything else.

Tic Tac Toe Library

The best and first open-source library for the logic of the Tic Tac Toe game.
Easy to use, with test/example project on GitHub Repositority

How to start a new game instance?

Just create a new instance of the TicTacToe class.
TicTacToeInstance ttt = new TicTacToeInstance();

How can I get current board info?

The board is a property of the TicTacToeInstance class.
It called BoardState, and it's array of array of BoardStateOption enum which can be Undefined if nothing in this field, X if the X player selected it, or O if the O player selected it. Full example of the BoardState is: ttt.BoardState[0][1], in this example we are getting the second column in the first row.

Can I change the board state as I want

No, you can't.

O'k, the player know where he want to put, what to do?

ttt.MakeOperation(row, column);, indexes base-zero.
This will return null if the game isn't finished or WinnerOption if the game finished.
WinnerOption can be: X, O, Tie

The game is finished, what's next?

Nothing, you can kill this instance, you can't do anything else.

Release Notes

If this is your first time using this library, check the Test project on the GitHub (Project URL)

Dependencies

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.0 668 4/12/2018