Commits

Steven! Ragnarök committed 0896a46

Add README/Spec

Comments (0)

Files changed (1)

+Chess Validator
+===============
+
+Usage
+-----
+
+From the project directory:
+
+`bin/move_validator boardfile.txt movefile.txt`
+
+where `boardfile.txt` is an ascii representation of a chess board of the form
+
+```
+bR bN bB bQ bK bB bN bR
+bP bP bP bP bP bP bP bP
+-- -- -- -- -- -- -- --
+-- -- -- -- -- -- -- --
+-- -- -- -- -- -- -- --
+-- -- -- -- -- -- -- --
+wP wP wP wP wP wP wP wP
+wR wN wB wQ wK wB wN wR
+```
+
+and `movefile.txt` is a representation of a set of chess moves in algebraic
+notation of the form
+
+```
+a2 a3
+a2 a4
+a2 a5
+a7 a6
+a7 a5
+a7 a4
+a7 b6
+b8 a6
+b8 c6
+b8 d7
+e2 e3
+e3 e2
+```
+The program will print to stdout `LEGAL` for legal moves and `ILLEGAL` for
+illegal moves. For example the output from the given board and move list is
+
+```
+LEGAL
+LEGAL
+ILLEGAL
+LEGAL
+LEGAL
+ILLEGAL
+ILLEGAL
+LEGAL
+LEGAL
+ILLEGAL
+LEGAL
+ILLEGAL
+```
+
+___NOTE:___ *This program is part of my application to
+[Ruby Mendicant University][1] and will be available after December 18, 2011 on
+[GitHub][2] and [BitBucket][3]*
+
+[1]: http://university.rubymendicant.com
+[2]: https://github.com/nuclearsandwich/puzzle_node
+[3]: https://bitbucket.org/nuclearsandwich/puzzle_node
+