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

Map which countries border one another to validate move actions #6

Open
lukemerrett opened this issue May 3, 2016 · 1 comment
Open

Comments

@lukemerrett
Copy link
Owner

lukemerrett commented May 3, 2016

How do we represent this in a clean way?

After this is done we need to finish the validator:

let moveFromToDestinationIsValid (move:RequestedMove, turn:CurrentTurnDetails) = 
    raise(NotImplementedException())
@lukemerrett
Copy link
Owner Author

I thought a cheap way to do this may be to have nested arrays creating X,Y co-ordinates, then storing the actual location in each region's record type. Less information stored and we could structure the data for faster lookup by x,y co-ords (e.g: dictionary).

However this doesn't work if you've got mulitple regions bordering a single, it doesn't necessarily translate into a grid.

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

No branches or pull requests

1 participant