PHPackages                             alcalyn/tictactoe - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. alcalyn/tictactoe

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

alcalyn/tictactoe
=================

Another TicTacToe implementation in PHP.

1.0.0(10y ago)0545MITPHPPHP &gt;=5.3

Since Feb 1Pushed 10y agoCompare

[ Source](https://github.com/alcalyn/tictactoe)[ Packagist](https://packagist.org/packages/alcalyn/tictactoe)[ Docs](https://github.com/alcalyn/tictactoe)[ RSS](/packages/alcalyn-tictactoe/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

TicTacToe
=========

[](#tictactoe)

Another TicTacToe implementation in PHP.

Download
--------

[](#download)

With composer:

```
    "alcalyn/tictactoe": "1.0.x",
```

Usage
-----

[](#usage)

```
use Alcalyn\TicTacToe\TicTacToe;

$grid = new TicTacToe();

$grid->play(1, 1, TicTacToe::X); // X plays middle
$grid->play(0, 2, TicTacToe::O); // O plays bottom left

// Is left empty ?
$grid->isEmpty(0, 1);

$grid->getCurrentPlayer();
// Returns TicTacToe::X or TicTacToe::O

$grid->getWinner();
// Returns TicTacToe::X, TicTacToe::O, TicTacToe::DRAW or null for no winner.

$grid->getBrochette();
// Returns the 3-in-a-row if there is (or null), with the numbers of the squares:
// Example: [2, 4, 6]
/*
Grid:
0 1 2
3 4 5
6 7 8
*/
```

See the complete [TicTacToe](src/TicTacToe.php) class.

License
-------

[](#license)

This library is under the [MIT](LICENSE) license.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3794d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/17f0c4d65197a7aed6ecc8fdedd5a097c7238c9be19aca08c92c05d38fd8c29e?d=identicon)[alcalyn](/maintainers/alcalyn)

---

Top Contributors

[![alcalyn](https://avatars.githubusercontent.com/u/1588144?v=4)](https://github.com/alcalyn "alcalyn (2 commits)")

### Embed Badge

![Health badge](/badges/alcalyn-tictactoe/health.svg)

```
[![Health](https://phpackages.com/badges/alcalyn-tictactoe/health.svg)](https://phpackages.com/packages/alcalyn-tictactoe)
```

###  Alternatives

[dotmailer/dotmailer-magento-extension

Marketing automation for Magento.

1710.9k](/packages/dotmailer-dotmailer-magento-extension)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
