The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Game::TextMapper::Solo - generate a map generated step by step

SYNOPSIS

    use Modern::Perl;
    use Game::TextMapper::Solo;
    my $map = Game::TextMapper::Solo->new->generate_map();
    print $map;

DESCRIPTION

This starts the map and generates all the details directly, for each step, without knowledge of the rest of the map. The tricky part is to generate features such that no terrible geographical problems arise.

ATTRIBUTES

rows

The height of the map, defaults to 15.

    use Modern::Perl;
    use Game::TextMapper::Solo;
    my $map = Game::TextMapper::Solo->new(rows => 20)
        ->generate_map;
    print $map;

cols

The width of the map, defaults to 30.

    use Modern::Perl;
    use Game::TextMapper::Solo;
    my $map = Game::TextMapper::Solo->new(cols => 40)
        ->generate_map;
    print $map;

METHODS

generate_map

This method takes no arguments. Set the properties of the map using the attributes.