Skip to content

Instantly share code, notes, and snippets.

@cstrahan
Forked from mattflo/MapKata.txt
Created July 12, 2011 17:51
Show Gist options
  • Save cstrahan/1078531 to your computer and use it in GitHub Desktop.
Save cstrahan/1078531 to your computer and use it in GitHub Desktop.
Map Kata
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