Solution to greed game problem given in ruby koans