Rewriting and Refactoring Hamurabi.bas Part 3.6 More Random Testing

Porting Hamurabi to Javascript has been pretty easy, but I got into the weeds writing tests, and then hit a swamp testing the few lines of game logic. Enter random testing, throwing semi-random data at the function, and seeing what comes out.

Continue reading Rewriting and Refactoring Hamurabi.bas Part 3.6 More Random Testing

Rewriting and Refactoring Hamurabi.bas Part 3.5 Game Logic and Random Testing

Testing the central function of Hamurabi, the game logic that carries out the plan for next year, and adds some random catastrophes, was coded up. This had me a bit confused.

Continue reading Rewriting and Refactoring Hamurabi.bas Part 3.5 Game Logic and Random Testing