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

Re: Tetris



On Sep 3,  1:03am, Zefram wrote:
}
} Improvements are welcome.

You're left-handed, aren't you.

For some reason the 's' key to rotate is not working for me.  I end up (I
think, I'm not sure) in vi insert mode when I press 's'.  Moving blocks
right and left with 'a' and 'd' works fine.

A little more error checking would be nice.

--- tetris.0	Mon Sep  3 09:38:55 2001
+++ tetris	Mon Sep  3 10:07:29 2001
@@ -27,6 +27,10 @@
 zle -N tetris
 function tetris {
 	emulate -L zsh
+	if ! zle ; then
+	    print -u2 "Use M-x tetris RET to play tetris."
+	    return 1
+	fi
 	tetris_save_buffer=$BUFFER
 	tetris_save_cursor=$CURSOR
 	local i

-- 
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