How to write Tetris in Scala? (code review)

Posted by eed3si9n on Stack Overflow See other posts from Stack Overflow or by eed3si9n
Published on 2009-06-06T07:49:24Z Indexed on 2010/05/29 0:22 UTC
Read the original article Hit count: 591

Filed under:
|
|

Today's the 25th birthday of Tetris. I believe writing Tetris clone is one of the best ways to familiarize oneself to a new language or a platform. It's not completely trivial and it lends itself well to learning language specific constructs like iterators and closures.

I've been hearing about Scala, and finally decided to read some docs and write a Tetris clone. So, this is my first Scala code. I did try to use functional constructs, but am sure there are lots of things I can improve to do it more Scala way. Please give me suggestions using comment. Also other submissions of Tetris clone in Scala are welcome too.

I'm aware that the actual question itself is somewhat subjective, but I think this is of some value since others can use this as example (or anti-example) code.

Edit: Let me rephrase the question. What can I do to make the code more Scala-ish?

© Stack Overflow or respective owner

Related posts about scala

Related posts about code-review