# Represents a subset of {1, 2, ..., 9},
# which in turn represents the leftover number that can be use to fill the corresponding cells.
typealias PossibleValue Uint

# Represents the number to fill into a cell, i.e. 1 to 9.
typealias Number Int

# Represents a subset of {1, 2, ..., 9},
# which in turn represents the leftover number that can be use to fill the corresponding cells.
typealias PossibleValue Uint
typealias LeftoverNumbers Uint

# Represents the index of a cell.
# The index counts from 1, starting at the top left, moving to right, then row-by-row to the bottom, ending with 81.
typealias Index Int

# The state of the game currently.
# This will evolve as the Sudoku puzzle is being solved.
type gameState
    cell::Vector{Number}

    leftoverNumbers_block::Vector{LeftoverNumbers}
    leftoverNumbers_row::Vector{LeftoverNumbers}
    leftoverNumbers_col::Vector{LeftoverNumbers}

    block_of::Vector{Index}
    row_of::Vector{Index}
    col_of::Vector{Index}

    sequence::Vector{Index}
    sequencePointer::Index

    currentCount::Int
    levelCount::Vector{Int}
end

function gameState()
    cell = Array(Number, 81)

    leftoverNumbers_block = Array(LeftoverNumbers, 9)
    leftoverNumbers_row = Array(LeftoverNumbers, 9)
    leftoverNumbers_col = Array(LeftoverNumbers, 9)

    block_of = Array(Index, 81)
    row_of = Array(Index, 81)
    col_of = Array(Index, 81)

    sequence = Array(Index, 81)
    sequencePointer = one(Index)

    currentCount = zero(Int)
    levelCount = Array(Int, 82)

    return gameState(cell,

                     leftoverNumbers_block,
                     leftoverNumbers_row,
                     leftoverNumbers_col,

                     block_of,
                     row_of,
                     col_of,

                     sequence,
                     sequencePointer,

                     currentCount,
                     levelCount)
end

Create type `gameState`, `Index`, 'Number`, and `LeftoverNumbers`.
Create type `gameState`, `Index`, 'Number`, and `LeftoverNumbers`.

This type is like a C's `struct`.  It will gather variable in a meaningful bundle.  Index, number, etc is clearer on intention than leaving it as `Int`.  It is also easier to pass a `struct` around functions, thus removing the need for the game state to be a global variable.

We also use type `Vector` and `Matrix` in this method, both of which are parametized types.  This allows use to describe a general structure that works for many underlying types.  For example, `Vector{Int}` and `Vector{Float64}` will work intuitively, as a vector of integer or vector of floats.  We will delve deeper into its power at a later time.
