| 1 | #!/usr/local/bin/perl | ||
| 2 | |||
| 3 | # ABSTRACT: Play the game | ||
| 4 | # PODNAME: snake.pl | ||
| 5 | |||
| 6 | use strict; | ||
| 7 | use warnings; | ||
| 8 | |||
| 9 | BEGIN { | ||
| 10 | if ( $^O eq 'darwin' && $^X !~ /SDLPerl$/ ) { | ||
| 11 | exec 'SDLPerl', $0, @ARGV or die "Failed to exec SDLPerl: $!"; | ||
| 12 | } | ||
| 13 | } | ||
| 14 | |||
| 15 | use Games::Snake; | ||
| 16 | |||
| 17 | Games::Snake->new()->run(); | ||
| 18 | |||
| 19 | exit; | ||
| 20 | |||
| 21 | |||
| 22 | |||
| 23 | =pod | ||
| 24 | |||
| 25 | =head1 NAME | ||
| 26 | |||
| 27 | snake.pl - Play the game | ||
| 28 | |||
| 29 | =head1 VERSION | ||
| 30 | |||
| 31 | version 0.000001 | ||
| 32 | |||
| 33 | =head1 SYNOPSIS | ||
| 34 | |||
| 35 | Start the game from the command line: | ||
| 36 | |||
| 37 | snake.pl | ||
| 38 | |||
| 39 | =head1 DESCRIPTION | ||
| 40 | |||
| 41 | This script starts the game. It will open a 800x600 window (plus the | ||
| 42 | size of the window frame). Use the arrow keys to control the snake. | ||
| 43 | Close the window to end the game. | ||
| 44 | |||
| 45 | =head1 SEE ALSO | ||
| 46 | |||
| 47 | =over 4 | ||
| 48 | |||
| 49 | =item * L<Games::Snake> | ||
| 50 | |||
| 51 | =back | ||
| 52 | |||
| 53 | =head1 AUTHOR | ||
| 54 | |||
| 55 | Jeffrey T. Palmer <jtpalmer@cpan.org> | ||
| 56 | |||
| 57 | =head1 COPYRIGHT AND LICENSE | ||
| 58 | |||
| 59 | This software is Copyright (c) 2012 by Jeffrey T. Palmer. | ||
| 60 | |||
| 61 | This is free software, licensed under: | ||
| 62 | |||
| 63 | The MIT (X11) License | ||
| 64 | |||
| 65 | =cut | ||
| 66 | |||
| 67 | |||
| 68 | __END__ |