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::Schroeder::Island - generate an island chain

DESCRIPTION

This creates an island chain in an ocean, based on the idea of a hotspot moving across the map. All regions atop the hotspot get raised at random; all regions outside the hotspot are eroded at random. This leaves a chain of ever smaller islands behind.

The rest of the code, river formation and all that, is based on the Alpine algorithm and therefore it also requires the use of roles.

    return Game::TextMapper::Schroeder::Island
        ->with_roles('Game::TextMapper::Schroeder::Square')->new()
        ->generate_map(@params);

SEE ALSO

Game::TextMapper::Schroeder::Alpine Game::TextMapper::Schroeder::Base Game::TextMapper::Schroeder::Hex Game::TextMapper::Schroeder::Square