Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compute all journeys from choose team spots to end game spot #13

Open
smelc opened this issue Jun 12, 2022 · 2 comments
Open

Compute all journeys from choose team spots to end game spot #13

smelc opened this issue Jun 12, 2022 · 2 comments
Labels

Comments

@smelc
Copy link
Owner

smelc commented Jun 12, 2022

This issue keeps tracks of adding a journeys :: Team -> [[Encounter]] function to Network.

Given a team t, this function should do the following:

  • Given the starting spot of this team, i.e. the value in chooseTeamSpots.
  • Compute all paths from the starting spot to endSpot. Coordinates that can be walked on (roads in the world map below) are in Roads.points.
  • On every path, collect the fights on this path.

For example, journeys Human is [p1 ,p2], where p1 is map Model.Encounter [Undead, Beastmen, Evil] and p2 is map Model.Encounter [Undead, ZKnights]. p1 is the path that goes to the left in the world map after the cemetery, while p2 is the path that goes to the right after the cemetry. The path start is the blue knight in the map below, which corresponds to the value mapped by Human in the chooseTeamSpots map.

When computing a journey you cannot go back on your path. You also cannot go through another chooseTeamSpot than the one you started from.

Here is the world map (load tiled/world.tmx with tiled to see it locally):

image

@smelc smelc added the worldmap label Jun 12, 2022
@smelc
Copy link
Owner Author

smelc commented Jun 12, 2022

@tek> this one is for you if and only if you find it fun!

@tek
Copy link
Collaborator

tek commented Jun 12, 2022

thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants