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 1w 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 46% 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

3840d 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

[dnoegel/php-xdg-base-dir

implementation of xdg base directory specification for php

6.3k245.5M21](/packages/dnoegel-php-xdg-base-dir)[b13/container

Container Content Elements - Create Custom Container Content Elements for TYPO3

1853.5M121](/packages/b13-container)[carlosbuenosvinos/ddd

Domain-Driven Design PHP helper classes (Application Services, Transactions, Domain Events, etc.

661195.8k4](/packages/carlosbuenosvinos-ddd)[sylius/fixtures-bundle

Configurable fixtures for Symfony applications.

518.4M22](/packages/sylius-fixtures-bundle)[cubeta/cubeta-starter

Cubeta-Starter: A developer's Swiss army knife for seamless CRUD operations. Choose between core integration or dev dependency. Enjoy a user-friendly GUI for code generation, enhancing your development workflow. Say goodbye to repetition, embrace productivity with Cubeta-Starter!

132.2k](/packages/cubeta-cubeta-starter)

PHPackages © 2026

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