<FONT face="Book Antiqua" size=2>This is a few years old but I just came across this site recently. This code was from an existing code base that was being updated for a new game. I changed the name of one of the variables to make it less obvious which game it is (it was very popular) because it would be potentially embarrasing for the programmer who wrote it. ;)</FONT>
<FONT face="Book Antiqua" size=2>Note that this is just one of many examples of similar occurrences. Most of them did not survive until the end but I'd be surprised if they were all gone by the time we shipped...</FONT>
<FONT face="Book Antiqua" size=2>do
{
// some code
} while (is_ocean(x,y) || (rocky_at(x, y) > 1) ||
(alt_at(x,y) >= ALT_HILLS) || (anything_at(x,y) >= 0) ||
(y < 2) || (y >= g_app.m_world.ys - 2) ||
(decent < (12 - (timeout/80))) ||
(river < (5 - (timeout/120))) ||
(base_dist < (game.turns?12:6)*g_app.m_world.root/MAP_ROOT) ||
(base_dist < ((16 - (timeout/64)))*g_app.m_world.root/MAP_ROOT) ||
(!game.turns && (timeout < 900) && (REGION.size < 36 - (timeout/64))) ||
((REGION.fertile * (g_app.m_world.wld[WATER]+1)/2) < (24 + (is_human(who)?(6-DIFF)*8:8) - (game.turns/16) - (timeout/16))) ||
((REGION.size < (5-(is_human(who) ? DIFF : 3))*48 - game.turns/16 - timeout/4)) ||
(shared && ((REGION.size / (bit_count(shared) + 1)) < (64 - (timeout/64)))) ||
((site_at(x, y) < 15 - (timeout/64)) && !game.turns && !rules(FLEXIBLE)) ||
(landmark_dist < (1024-timeout)/128) || !landmark_dist ||
(game.turns && (map_loc(x,y)->terr > 0)) ||
//(is_human(who) && !net_game && !game.turns && (vector_dist(x, y, landmark_x, landmark_y) > 8) && (vector_dist(x, y, crater_x, crater_y) > 8) && (timeout < 800)) ||
((base >= 0) && (WHOM == by) && (region_at(BASE.x, BASE.y) == reg)));
</FONT>
<FONT face="Book Antiqua" size=2></FONT>