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())) {
m_land_size_total++;
if (Player_Number const owner = fc.field->get_owned_by()) ++land_size[owner - 1];
}
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)?
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)?