Funny pebble game in Ansi C