tictactoe3d-0.1.0.3: 3D Tic-Tac-Toe game

Safe HaskellNone
LanguageHaskell2010

Game.TicTacToe3D.TicTacToe3D

Description

Defines a state machine of 3D Tic-Tac-Toe.

Synopsis

Documentation

type Team = Bool Source

Represents a team.

type Issue = Maybe Team Source

Represents a state of one point in a board; owned by either team or empty.

type Board = (Int, V3 Issue) Source

Represents a tic-tac-toe board with its side length.

data Game Source

Represents a state of a tic-tac-toe game. Done represents a game that has finished.

Constructors

Game Board Team 
Done Team [I3] 

done :: Game -> Bool Source

Retrieves whether the given game has finished or not.

newGame :: Game Source

An initialized state of a game.

playGame :: Int -> Game -> Game Source

Lets the current team play at the specified square.