Encapsulate object-state state tests and setttings in macros.
This isn't a complete refwctoring, just the part than can be done with transparetly correct capture of inlinre logic into macros. No logic changes. Tests pass, 100% coverage.
This commit is contained in:
parent
9cd7c53d78
commit
02987d0330
7 changed files with 32 additions and 25 deletions
2
score.c
2
score.c
|
@ -50,7 +50,7 @@ int score(enum termination mode)
|
|||
k = 16;
|
||||
if (game.objects[i].prop > STATE_NOTFOUND)
|
||||
score += 2;
|
||||
if (game.objects[i].place == LOC_BUILDING && game.objects[i].prop == STATE_FOUND)
|
||||
if (game.objects[i].place == LOC_BUILDING && PROP_IS_FOUND(i))
|
||||
score += k - 2;
|
||||
mxscor += k;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue