tictactoe3d-0.1.0.3: 3D Tic-Tac-Toe game
Game.TicTacToe3D.Vector3
Description
Defines a 3-layered Vector and relative utilties.
Synopsis
type Dim3 a b = a (a (a b)) Source
Represents a 3-layered structure.
type V3 a = Dim3 Vector a Source
Represents a 3-layered vector.
type I3 = (Int, Int, Int) Source
Represents an index of a 3-layered vector.
base :: Int -> Int -> [Int] Source
>>> base 2 10 [0, 1, 0, 1]
>>>
base 2 10
i3 :: Int -> I3 Source
>>> i3 1 (1, 0, 0)
i3 1
>>> i3 26 (1, 1, 1)
i3 26
(!) :: V3 a -> I3 -> a Source
Retrieves the specified location's element.
(//) :: V3 a -> (I3, a) -> V3 a Source
Replaces the specified location's element and retrieves the updated vector.
init :: Int -> (I3 -> a) -> V3 a Source
Initializes a vector with the given values.