Merge lp:~widelands-dev/widelands/bug543113 into lp:widelands
Proposed by
Jens Beyer
Status: | Rejected |
---|---|
Rejected by: | SirVer |
Proposed branch: | lp:~widelands-dev/widelands/bug543113 |
Merge into: | lp:widelands |
Diff against target: |
54 lines (+22/-3) 2 files modified
src/logic/game.cc (+19/-3) src/logic/game.h (+3/-0) |
To merge this branch: | bzr merge lp:~widelands-dev/widelands/bug543113 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Shevonar | Needs Fixing | ||
Review via email: mp+128126@code.launchpad.net |
Description of the change
Implemented variant 2 of the bug description
percentage of total land mass (then, only land fields should be counted)
It uses the same counting method as the Territorial Lord win condition (which is the most useful statistic, I think).
To post a comment you must log in.
Instead of your nested if and else statement you can use just two if statement.
if ((fc.field- >nodecaps( ) & ~MOVECAPS_SWIM) and ((fc.field- >nodecaps( ) & MOVECAPS_WALK) or fc.field- >get_immovable( ))) { size_total+ +; >get_owned_ by())
++land_ size[owner - 1];
m_land_
if (Player_Number const owner = fc.field-
}
Is it even necessary to check if the field is not "swimmable"? Can a field be walkable and swimmable (I don't think so) or swimmable and have and immovable (I am not sure about that)?