Java version of Fapi's "The Incremental Game"