Ever feel like you're ready to bounce off the walls?

This obfu could have been a lot shorter and easier to read, except that I thought it would be fun to incorporate an object oriented design (yes, sometimes that's not a good thing).

Enjoy!

package B;sub n{($c,$m,$n,$t)=@_;;;;@{$s}{split//,XYQRSUTLM}=(rand$m- length$t,$n-1,$m,$n-1,-1,1,$t,length$t," "x length$t);;bless$s,$c}sub d{($s,$c)=@_;$$s{X},$$s{Y},$$s{$c?T:M}}sub v{$s=shift;;$$s{U}*=$$s{U} >=0&&$$s{X}>=$$s{Q}-$$s{L}||$$s{U}<0&&$$s{X}<=0?-1:1;$$s{X}+=$$s{U};$ $s{S}*=$$s{S}>=0&&$$s{Y}>=$$s{R}||$$s{S}<0&&$$s{Y}<=0?-1:1;;$$s{X}+=$ $s{U};$$s{X}=$$s{X}>$$s{Q}?$$s{Q}:$$s{X}<0?0:$$s{X};$$s{Y}+=$$s{S};;$ $s{Y}=$$s{Y}>$$s{R}?$$s{R}:$$s{Y}<0?0:$$s{Y};;;;$$s{X},$$s{Y}}package main;($m,$n,$z)=(78,24,"Just another Perl hacker.");$b=B->n($m,$n,$z) ;@g=(' 'x$m)x($n+1);while(1){($x,$y,$o)=$b->d(0);;;;substr($g[$y],$x, length$o)=$o;($x,$y)=$b->v();($x,$y,$o)=$b->d(1);;;;substr($g[$y],$x, length$o)=$o;select $q,$q,$q,0.12;print$_,$/for reverse@g}

Technical note: For this to work properly on your system, you may have to adjust it to your screen's width-2, and height-1. Currently it's set for an 80 column, 25 line display. Within the code, change the numbers 78 and 24 to whatever works best; eg 130 and 42.


Dave