Follow-up Comment #5, bug #20577 (project freeciv):

- No changes to ruleset.c? I thought the value was supposed to be read from
the ruleset.
- Don't use magic numbers "gameloss_style & 4". In fact you should probably
make gameloss styles bitwise specenum
- Spaces between many elements missing "while (n<0)" -> "while (n < 0)"
- Block starting brace should not be in new line
"while ()
  {"
->
"while () {"

- Braces needed even when block following "if" is just one line (so if another
line gets ever added, things will not blow up)
"if (!fc_rand(3))
   break; /* Out of luck */
" ->
"if (!fc_rand(3)) {
   break; /* Out of luck */
 }"

- Empty line needed between variable declararions and code
- "if (evcsize < 3) evcsize = 0; else evcsize -=3;" ->
"if (evcsize < 3) {
  evcsize = 0;
} else {
  evcsize -= 3;
}"

- Decrlaration of "int conqsize" after previous code (not in the beginning of
block)
- What happens to palace if it's in transfered cities? You disable
"savepalace" for a while so it won't be moved from city to city multiple
times, but should you finally rebuild it somewhere?
- Comment type "palyer" -> "player"

- "+    /* out of sheer cruelty we reanimate the player 
+     * so he can behold what happens to his empire */
+    pplayer->is_alive = TRUE;"
sounds worrisome. Should't the player stay alive all the time instead (I'm
worried what may happen while (s)he is temporarily marked dead) Actually, from
the patch it seems that this gets overwritten with "pplayer->is_alive =
FALSE;" anyway

- As create_barbarian_player() may return existing barbarian with already
established capital, you should protect against trying to give him second
one.


    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?20577>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to