Posted by on Apr 12, 2009 in Ruby | Comments Off

I’ve been fleshing out my game of monopoly a bit more.  Put in the concepts of houses and hotels.  Still haven’t gotten the chance cards or community chest.  I’ll probably get those later on.  Thought I’d share the little bit of joy that I usually get when writing code in Ruby.  Here I’m basically declaring the data for various properties.  Notice that even with some the necessary noise of commas and the different brackets (all issues that could be resolved with a proper DSL clean slate implementation for example), the code is still easy to follow even with very little appreciation for the programming language itself.  It’s just that clean.  Stuff like this is a real joy to write and then polish.

Expressive code with Ruby

Expressive code with Ruby