superme2018/noughts-and-crosses

A test package for laravel, holds a basic version of the noughts and crosses game.

dev-master 2019-01-13 12:58 UTC

This package is auto-updated.

Last update: 2025-07-20 00:09:55 UTC


README

Noughts and Crosses (A laravel package)

This is a package creation test, it contains some logic that mimics a simple "Noughts and Crosses" game.

Use, composer require superme2018/noughts-and-crosses to add to your project.

// Namespace to import into controller and or class:
use SuperMe2018\NoughtsAndCrosses\NoughtsAndCrosses;

// Player move array format (can take player 1 or player 2)
$playerMove = ["playerId" => 1, "moveId" => 4];

// Instance and usage.
$noughtsAndCrosses = new NoughtsAndCrosses();
return $noughtsAndCrosses->makeMove($playerMove);

or

(new NoughtsAndCrosses)->makeMove(($playerMove);