Created
June 28, 2011 18:08
-
-
Save mattflo/1051755 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 to which the piece can move | |
** 1 move | |
** 2 moves | |
** etc... | |
** until you are thrilled with your solution or ready for something new | |
note: you don't have to use all moves. i.e. if you have 2 moves you don't have to use both | |
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