我需要一个简单的用于perl的蛇游戏 [英] I need a simple snake game for perl

查看:101
本文介绍了我需要一个简单的用于perl的蛇游戏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我需要一个简单的蛇游戏,其代码使用perl。请帮助!!



谢谢

Jay

Hi,

I need a simple snake game with code using perl. Please help !!

Thanks
Jay

#!usr/bin/perl

# ABSTRACT: Play the game
# PODNAME: snake.pl

use strict;
 se warnings;

BEGIN {
    if ( $^O eq 'darwin' && $^X !~ /SDLPerl$/ ) {
        exec 'SDLPerl', $0, @ARGV or die "Failed to exec SDLPerl: $!";
    }
}

use Games::Snake;
 
Games::Snake->new()->run();

exit;

__END__

=pod

=head1 SYNOPSIS

Start the game from the command line:

snake.pl

=head1 DESCRIPTION

This script starts the game. It will open a 800x600 window (plus the
size of the window frame). Use the arrow keys to control the snake.
Close the window to end the game.

=head1 SEE ALSO

=over 4

=item * L<Games::Snake>

=back

=cut

推荐答案

^ O eq ' darwin'&&
^O eq 'darwin' &&


^ X!〜/ SDLPerl
^X !~ /SDLPerl


/){
exec ' SDLPerl'
/ ) { exec 'SDLPerl',


这篇关于我需要一个简单的用于perl的蛇游戏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆