- or download this
#!/usr/bin/perl
use strict;
...
print $![3],shift,"You killed $![0] space invaders",$,;
exit
}
- or download this
#!/usr/bin/perl
use strict;
use Term::ReadKey;
ReadMode 'cbreak';
- or download this
# init some stuff
$,=$/;
...
$*=$=x2;
@!=(qw(4 _ " a 1 1 0 0 ));
$![7]=`clear`;
- or download this
# prepare an important string...
push(@!,split shift(@!),
...
.'domm@zsi.at j=left k=fire l=right'_'#'x58_("$*p$*"x11).
$=x3_$*.("$*$*q"x11).$=_("p$*$*"x11).$=x3_($=x3).("$*$*q"x11)_
1_$b.$=."W$b"_'#'x 587);
- or download this
push(@! split(4,"$=W...58"));
- or download this
$=W8W$=8$b eq "j"8W$=8$=W8 $b eq"l"8W$=8W!8($b eq"k"&&$_!~/!/)a#W$=8#$
+=W8$=W#8W$=#8#!8##a\*8$=8p$=8$=p8$=q8q$=8p(#.{59})$=8$=$1q8#q(.{60})$
+=8#$=$1pap(.{60})!8$![0]++;"\*$1$="8q(.{60})!8$![0]++;"\*$1$="8(t.*)!
+8$b=(length$1)-61;substr($1,0,$b )."!". substr($1,$b+1).$=
<br>
x"gs'"x"c"es'"c"z"gs if'.shift"z"l"just another perl hacker"l
<br>
'SpaceInvaders'.($=x12).'domm@zsi.at j=left k=fire l=right'_'#'x58_("$
+*p$*"x11). $=x3_$*.("$*$*q"x11).$=_("p$*$*"x11).$=x3_($=x3).("$*$*q"
+x11)_1_$b.$=."W$b"_'#'x 58
- or download this
# generate board and regex subs
j(split shift@!,pop@!);
...
# start main loop
&p;
- or download this
(
'SpaceInvaders'.($=x12).'domm@zsi.at j=left k=fire l=right',
...
$b.$=."W$b",
'#'x 58,
)
- or download this
(
'SpaceInvaders'.('8'x12).'domm@zsi.at j=left k=fire l=right',
...
'88888888888888888888888888888'.'8'."W88888888888888888888888888888",
'#'x 58,
)
- or download this
# init map
sub j {
...
$a.=m/^1/?("#$b$=$=$b#$,"x12):"#".eval( )."#$,";
@_&&j(@_)
}
- or download this
(x, gs', x, c, es', c, z, gs if'.shift, z, l , just another perl hacke
+r ,l)
- or download this
sub a {
eval"sub'".pop().'{eval\'s/\'.(shift).\'/\'.(shift).\'/'.pop().';@_&
+&'.pop().'(@_)}';
@_&&a(@_)
}
- or download this
(
$=W8W$=8$b eq "j"8W$=8$=W8 $b eq"l"8W$=8W!8($b eq"k"&&$_!~/!/)
...
\*8$=8p$=8$=p8$=q8q$=8p(#.{59})$=8$=$1q8#q(.{60})$=8#$=$1p
p(.{60})!8$![0]++;"\*$1$="8q(.{60})!8$![0]++;"\*$1$="8(t.*)!8$b=(lengt
+h$1)-61;substr($1,0,$b )."!". substr($1,$b+1).$=
)
- or download this
$_=$a;
map{s/\n//g}@!;
map{s/ //g}@!;
- or download this
sub p{
$b=ReadKey -1;
...
print $![3],$![2];
&p
}
- or download this
$![1]</code< (this is where we store the number of moves) and 3 is zer
+o (i.e. every three moves), call <i>x</i>. <i>x</i> is one of the aut
+ogenerated subs that does some substitution on $_. It substitutes the
+ first value passed to it with the second, until there are no values
+left.<br>
What gets passed to <i>x</i> is <code>$![6]
- or download this
\* $=
p$= $=p
$=q q$=
p(#.{59})$= $=$1q
q(.{60})$= #$=$1p
- or download this
z(split$=,$![4]);
x(split$=,$![5]);
c(split$=,$![7]);
- or download this
sub h {
print $![3],shift,"You killed $![0] space invaders",$,;
exit
}
- or download this
sub END{
ReadMode 'normal'
}