-----------------------------------------

Students taking 05-630 Programming Usable Interfaces are
expected to have a level of programming experience commensurate with
having taken a semester course in "intro to programming" in a language
like C++ or Java.

In recent experience, students who have taken a programming course more
than one or two years ago may have forgotten enough that they are not
prepared for 05-630.  Similarly, some students who have taken a
programming course and not done well may also not be prepared.

Students who are prepared for 05-630 should be able to easily write the
following program in C, C++, Java, or another similar language, in a 48
hour contiguous period of time:

------------------------------------------------------------

SIMPLIFIED CHESS:

This program reads in the position of a chessboard for a simplified
version of chess and prints out all the legal moves that white can make
from that position.

The input is in the following form:

COLUMN ROW COLOR PIECE

Where Column is a-h, Row is 1-8, Color is "b" (black) or "w" (white), and Piece is one of  "b" (bishop), "r" (rook), or "q" (queen).   Each player can have any number of any kind of piece.  A sample input file would look like:

b 3 w r
a 2 w q
d 7 w b
h 8 b r
h 7 b q
e 6 w r

Your program should print out all the legal moves that white can make
from this starting position.

  There are no kings or pawns in this game, to keep it simple -
obviously, you don't need to worry about or check for check or checkmate.
In fact, you don't need to understand Chess: all you need to know is that:

1) rooks can move any number of steps in a straight horizontal or vertical line (stopping anywhere along the way is a legal move), until they either
	- hit an edge of the board (i.e. they must stay on the 64 squares of the board)                 
	- hit an opponent's piece (and capture it, replacing it on the board)
          - hit a piece of their own color (they must stop *before* they get there; you can not capture a piece of your own color).

2) bishops are just like rooks, except they move in straight diagonal lines until they hit something.

3) queens are like a combination of bishops and rooks: they can move any number of steps in a straight horizontal, vertical, or diagonal line until they hit another piece or the edge of the board.

Sample output from your program should have the following form (this does not correspond to the sample input; it's just to show you the necessary format):

There are 10 legal moves for White.  They are:

White queen starting on a1 can move to
         a2
         a3
         a4 (capturing Black rook)
         b1
         c2
         d3 (capturing Black queen)

White bishop starting on f6 can move to
         g7
         h8
         e5
         d4 (capturing Black bishop)

