CAT | php
I’ve been using this as a replacement for watchr which I use to autorun tests whenever I make code changes. I’ve switched to guard for a number of reasons, chief amongst them being the awesome notification support. You can use growl, libnotify and rb-notifu to notify test pass/fail.
Here’s the Guardfile I’ve been using. This is tailored for Zend Framework 2 so that whenever I modify a php class under a module directory it will run the tests for that particular class. Rapid feedback for the win!
I forgot how fun PHP can be for quick and dirty things like this.
This afternoon I decided to try out the Blackjack TDD exercise again in php, and decided to go ahead and write a quick and simplistic interface to it, and put it up on my website to play around with. It was a fun waste of two hours, but what I’m happy about is that I have something to play with, although it’s broken in some ways. You can’t split. You can refresh the page and hit even after the game has completed. But the basics do work.
It’s actually been a fun little project… I’m thinking of spending the afternoon tomorrow extracting some rules out of it (and creating some) and implementing a rule processor to alow games with different rule sets (i.e. dealer must hit on soft 17, spanish 21 rules, etc). I’ll probably also implement a betting system and the capability to split hands and double down. Adding the capability for multiple players might be a fun addition to add in the near future as well.
Anyhow, for those who are interested, you can play with it here.