Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Tetris



On Sep 3,  5:14pm, Bart Schaefer wrote:
}
} I end up (I think, I'm not sure) in vi insert mode when I press 's'.

I figured it out.  I set up the entire file as an autoloadable function,
so the tetris_rotations array became a local.  Might be useful to protect
against that:

--- tetris.0	Mon Sep  3 09:38:55 2001
+++ tetris	Mon Sep  3 10:39:54 2001
@@ -4,7 +4,7 @@
 tetris_hsz=11
 tetris_vsz=20
 tetris_shapes=(0x0f00 0x4e00 0x6600 0x4620 0x2640 0x2260 0x4460)
-typeset -A tetris_rotations
+typeset -gA tetris_rotations
 tetris_rotations=(
 	0x0f00 0x4444 0x4444 0x0f00
 	0x4e00 0x4c40 0x4c40 0x0e40 0x0e40 0x4640 0x4640 0x4e00

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



Messages sorted by: Reverse Date, Date, Thread, Author