Nice port! Crazy how few lines of code this is, -tieg
On Feb 4, 2008 5:12 PM, Thomas Bell <[EMAIL PROTECTED]> wrote: > Very cool. Works and looks great. > --Tom > > > On Feb 4, 2008 2:11 PM, Jeremy Ashkenas <[EMAIL PROTECTED]> wrote: > > > Ladies and Gentlemen, may I present to you a Tetris: > > Crafted from twigs and skittles. Forged in the winter ice. > > > > The particulars: > > > > Left, right, up and down to move the piece, > > P to pause and N to start a new game. > > > > To use it, you'll have to edit the first line of the file, > > and point the path to the directory that holds tetris.rb > > and its board.png background: > > > > $base_path = '/path/to/your/tetris' > > > > The windows_tetris version should be easier to edit for > > windows machines (with proper text formatting). > > > > Making this yesterday afternoon has impressed upon me > > once again just how wonderful Ruby Shoes can be. I had > > to do a nearly identical project in Java for a class, once. > > It was a major project, and took over a week. > > The resulting morass was 1042 lines of code, and difficult > > to puzzle through. This Tetris took an afternoon and evening, > > weighs in at 289 lines, and is oh-so-much easier to read > > and understand. > > > > Enjoy. > > — Jeremy > > > > > > > > > > > > > > > > > > >
