Skip to content

Update region cost computation#22

Open
ianpalencar wants to merge 1 commit intotdfischer:masterfrom
ianpalencar:transit
Open

Update region cost computation#22
ianpalencar wants to merge 1 commit intotdfischer:masterfrom
ianpalencar:transit

Conversation

@ianpalencar
Copy link

Fixes #12

Ensure hub to hub travel is free
Fix the discount logic so it actually displays discounts
Add some tests

Ensure hub to hub travel is free
Fix the discount logic so it actually displays discounts
Add some tests

public class RegionTest {

private World world = Mockito.mock(World.class);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The world isn't actually needed, the location computation code does a check that it's not null and a by-reference equals to make sure that the distance is being computed within the same world. Otherwise nothing's needed on it, hence the mockito voodoo.

@ianpalencar
Copy link
Author

Oh also I should note I didn't test this, so I should probably do that before it gets merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Transit between hubs should be zero, but it is 1.

1 participant