thisishardtoread

code, thoughts, and learnings

github.com/arbylee

Python Warrior!

12 Feb 2014

Several months ago I was introduced to Ryan Bates’s ruby-warrior project, and I had a blast playing through it. If you haven’t seen it before, it’s a “game designed to teach the Ruby language and artificial intelligence in a fun, interactive way.” You progress through the game by writing Ruby code which determines your warrior’s behavior. If there’s an enemy monster nearby, will you attack it? Will you walk around it? Will you stand there and let it pummel you to death?

It’s a fun little game, and if you want some Ruby practice, it’s a nice break from the plethora of generic coding exercises. And if playing it on the command line isn’t your thing, then check out this browser version.

Anyway, I later found myself diving into the world of Python, and after tiring myself out on the koans and code katas, I wanted something else. I looked back at ruby-warrior and wished for a Python version. And when it never came, I decided to build it myself. I figured it would be good practice and result in something that could help other people learn Python too.

Following my typical workflow, I built up some motivation, planned out regular development time, and then proceeded to procrastinate for several months instead.

But after some on-and-off development, Python Warrior is ready for play! So if you want to relive your ruby-warrior glory days in a new language, or if you’re looking for a different way to dive into Python, you should check it out on Github or PyPi.