NAME

Game::WordBrain::Letter - Representation of a Letter in a WordBrain Game

SYNOPSIS

    # Create a new Game::WordBrain::Letter
    my $letter = Game::WordBrain::Letter->new({
        letter => 'a',
        row    => 1,
        col    => 3,
    });

    # Stringification is overloaded
    print $letter;  # prints 'a'

    # Equality is overloaded
    if( $letter == $letter ) {
        print "Same letter!';
    }

DESCRIPTION

Represents a Letter in a WordBrain Game.

ATTRIBUTES

letter

A single character string that contains the actual letter represented [a-z].

row

The row in a WordBrain game where this letter appears.

col

The col in a WordBrain game where this letter appears.

METHODS

new

    my $letter = Game::WordBrain::Letter->new({
        letter => 'a',
        row    => 1,
        col    => 3,
    });

Given a letter, a row, and a col, returns an instance of a Game::WordBrain::Letter.