The beauty of programming: a row of stone games and extension problems source code