-
-
Save cstrahan/1078531 to your computer and use it in GitHub Desktop.
Map Kata
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Map Kata | |
======== | |
* Given a simple grid, e.g. 10x10 | |
* Given a game piece is placed somewhere on the grid, e.g. 5,5 | |
* Given the piece canNOT be moved diagonally, e.g. one up, one left... | |
* Find all available squares the piece can move to in | |
** 1 move | |
** 2 moves | |
** etc... | |
** until you are thrilled with your solution or ready for something new | |
Take it up a notch | |
================== | |
* add hazards to squares - pieces canNOT move into hazard squares | |
* this blocks access to some squares that would otherwise be reachable | |
Take it up another notch | |
======================== | |
* see if your algorithm still performs well on a bigger grid, e.g. 15x15 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment