Archive

Posts Tagged ‘tetris’

Writing Tetris in Clojure

September 10, 2011 6 comments

Good evening to everyone. Today I want to guide you step-by-step through the process of writing a game of Tetris in Clojure. My goal was not to write the shortest version possible but the concisest one and the one that would use idiomatic Clojure techniques (like relying on the sequence processing functions and making a clear distinction between purely functional and side-effect code). The result I got is about 300 lines of code in size but it is very comprehensible and simple. If you are interested then fire up your editor_of_choice and let’s get our hands dirty.
The whole code is available here.
Read more…