Spades in PHP: Play-by-Play versus Play-at-Once

Earlier this week I posted about my PHP spades project for automated testing of bidding and playing strategies. In that post I highlighted my use of the strategy design pattern to make it easy to test a variety of approaches to the game; however, I didn't provide much structural detail. Lucky you, as it turns out, because the structure I was using at the time was far from ideal.

My overall idea for running the tests was to be able to use a very thin controller script, something along these lines:


Spades and the Strategy Pattern

So lately my wife and I have been playing quite a bit of spades with some good friends of ours; if you've never played, it's quite fun, but you don't want to be on my team :)

Subscribe to RSS - spades