July 24 2012 — fetching water
It's five months until Christmas, and I'm coding up tests and implementation for my Perl 6 adventure game to allow me to fetch water from a brook. Life could be worse. 哈哈
Github, roll the commits!
- There's now a helmet.
- You can't take it if it's pitch black. I talked about adding this a few days ago. Now I got around to it.
- You can't examine it either if it's pitch black.
- Let's add a brook and water to the hill. I feel like a landscape architect here.
- There are two ways to fetch water. One is the more direct "put water in helmet", which works.
- Some people, however, feel like it should work equally well to put the helmet in the brook and then pick it up again. They are right; that should work. And now it does.
I don't have much to say in the way of comments. Making those commits was very straightforward. The last one meant a little tinkering around since I had to add yet another hook/listener. But not so bad overall.
Working this way really feels like "programming in the domain". The events and exceptions really help in this regard. I want to program more things like this.
Tomorrow we'll use our newly-fetched water to put out the fire. Then we'll have access to the innermost room... the room after which the game is named... the crypt, where it's silent as a grave, because well, you know.
Not much left now.