in reply to Super Nibbles

Very good script indeed, I can learn lot of things from your coding.

Replies are listed 'Best First'.
Re^2: Super Nibbles
by teamster_jr (Curate) on Nov 15, 2005 at 15:39 UTC
    unlike this:
    use Term::ReadKey;ReadMode 3;%v=qw{a -1 s 80 w -80};$f=print"\ec";{$d+ +=$ v{$c=ReadKey(-1)||$c}||1;p($d=$d>1600?$d-1600:$d<0?$d+1600:$d);$d-int$ +f? p(pop@s,$"):p($f=rand 800);9x1e7;map$d-$_||${ReadMode 0;exit},@s;@s=($ +d, @s);redo}sub p{printf"\e\[%d;%dH%s\e[20H",1+$_[0]/80,$_[0]%80,$_[1]||x +}
    from here oh yeah: w=up s=down a=left d=right
    a
    update: added key defs