Status update

I have been silent for a while, but the recent weeks have been quite busy. I finally managed to graduate and Hello World Open took pretty much all my free-time. Now both of those are behind and I can again concentrate on coding pyherc and learning new things.

I decided that it’s time to learn some more Hy and have been writing new functionality to pyherc with it. At the same time I have simplified some old code and converted it into Hy. I know I’m taking a hit on productivity and execution speed of the code, but the first one should get better with practice and the second one should be minor enough. And Hy is splendid language anyway. For example, I have a part of program that detects if it’s a special date:

(date-rules
 (SpecialTime.christmas (= month 12) (in day [24 25 26]))
 (SpecialTime.aprilfools (= month 4) (= day 1)))

In the runtime that is equivalent to:

def get_special_events(year, month, day):
    events = []
    if month = 12 and day in [24, 25, 26]:
        events.append(SpecialTime.christmas)
    if month = 4 and day = 1:
        events.append(SpecialTime.aprilfools)
    return events

Quite nifty, right?

Current development focuses on new monster, fungus. It is progressing nicely and I have added some more building blocks to the game. In the future it will be easier to create monsters that can multiply (think slimes and fungi) or morph to other monsters (think vampires, werewolves and such). Below is a screenshot of current development version. Blue fungi is multiplying and eventually morphing to orange great fungi.

fungi, mitosis and metamorphosis

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s