GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Games::LMSolve::Input(3) User Contributed Perl Documentation Games::LMSolve::Input(3)

Games::LMSolve::Input - input class for LM-Solve

version 0.14.2

    use Games::LMSolve::Input;
    my $input_obj = Games::LMSolve::Input->new();
    my $file_spec = "board.txt";
    my $spec =
    {
        'dims' => { 'type' => "xy(integer)", 'required' => 1, },
        'planks' => { 'type' => "array(start_end(xy(integer)))",
                      'required' => 1,
                    },
        'layout' => { 'type' => "layout", 'required' => 1,},
    };
    my $input_fields = $input_obj->input_board($filename, $spec);

This class implements the "input_board" method, which enables to read boards in "key = value" format. Several types of values are supported.

Constrcuts a new object. Accepts no meaningful arguments.

$self->input_board($file_spec, $spec);

This method accepts two arguments. $file_spec which is the filename, reference to a filehandle, or reference to the text containing the board specification.

$spec is a specification of the board given as a reference to a hash. The keys are the keys inside the file. The values are references to hashes containing parameters. The 'required' parameter is given to specify that an exception should be thrown if this key was not specified. The other parameter (a mandatory one) is type which specified the type of the value. Available types are:

A simple integer (will be returned as a scalar)
An (X,Y) pair. Will be returned as { 'x' => $x, 'y' => $y }.
An array of [(X1,Y1),(X2,Y2),(X3,Y3)...] pairs. Will be returned as a reference to an array of (X,Y) pairs.
An array of [((SX1,SX2)->(EX1,EX2)), ((SX1,SX2)->(EX1,EX2))...] pairs of (X,Y) pairs. Will be returned as a reference to an array of

    {
        'start' => { 'x' => $start_x, 'y' => $start_y },
        'end' => { 'x' => $end_x, 'y' => $end_y },
    }
    
This is a generic layout that comes inside a here-document. It is returned as an array of lines that later have to be processed by another routine.

$self->input_horiz_vert_walls_layout($width, $height, \@lines)

Input a horizontal-vertical line layout as exists in a maze.

Written by Shlomi Fish ( <http://www.shlomifish.org/> )

The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources.

  • MetaCPAN

    A modern, open-source CPAN search engine, useful to view POD in HTML format.

    <https://metacpan.org/release/Games-LMSolve>

  • RT: CPAN's Bug Tracker

    The RT ( Request Tracker ) website is the default bug/issue tracking system for CPAN.

    <https://rt.cpan.org/Public/Dist/Display.html?Name=Games-LMSolve>

  • CPANTS

    The CPANTS is a website that analyzes the Kwalitee ( code metrics ) of a distribution.

    <http://cpants.cpanauthors.org/dist/Games-LMSolve>

  • CPAN Testers

    The CPAN Testers is a network of smoke testers who run automated tests on uploaded CPAN distributions.

    <http://www.cpantesters.org/distro/G/Games-LMSolve>

  • CPAN Testers Matrix

    The CPAN Testers Matrix is a website that provides a visual overview of the test results for a distribution on various Perls/platforms.

    <http://matrix.cpantesters.org/?dist=Games-LMSolve>

  • CPAN Testers Dependencies

    The CPAN Testers Dependencies is a website that shows a chart of the test results of all dependencies for a distribution.

    <http://deps.cpantesters.org/?module=Games::LMSolve>

Please report any bugs or feature requests by email to "bug-games-lmsolve at rt.cpan.org", or through the web interface at <https://rt.cpan.org/Public/Bug/Report.html?Queue=Games-LMSolve>. You will be automatically notified of any progress on the request by the system.

The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :)

<https://github.com/shlomif/lm-solve-source>

  git clone git://github.com/shlomif/lm-solve-source.git

Shlomi Fish <shlomif@cpan.org>

Please report any bugs or feature requests on the bugtracker website <https://github.com/shlomif/lm-solve-source/issues>

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

This software is Copyright (c) 2007 by Shlomi Fish.

This is free software, licensed under:

  The MIT (X11) License
2020-10-16 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.