**Chess Moves ? **
Any language but NOT of C/C++/C# or Java; EVEN A SCRITING LANGUAGE WILL DO.
?
Write a program that takes as input:
·? ? ? ? ? ? ? ? The name of a chess piece (King, Queen, Bishop, Knight, Rook, Pawn)
·? ? ? ? ? ? ? ? A starting digit, 0 to 9.
As output the program should produce a list of all the legal phone numbers, beginning with the starting digit, that can be generated by moving the piece around a standard phone pad. ? When returning your solution, please provide with your answer ? the total number of different phone numbers that are produced for the case of a Queen starting on digit ‘5’.
?
## Deliverables
**Chess Moves ? **
Visual Basic or any language that runs on CLR or JVM .Any language but NOT of C/C++/C# or Java;
?
Write a program that takes as input:
·? ? ? ? ? ? ? ? The name of a chess piece (King, Queen, Bishop, Knight, Rook, Pawn)
·? ? ? ? ? ? ? ? A starting digit, 0 to 9.
As output the program should produce a list of all the legal phone numbers, beginning with the starting digit, that can be generated by moving the piece around a standard phone pad. ? When returning your solution, please provide with your answer ? the total number of different phone numbers that are produced for the case of a Queen starting on digit ‘5’.
A legal phone number has the following requirements:
·? ? ? ? ? ? ? ? Must be 10 digits long
·? ? ? ? ? ? ? ? Can contain only digits (no * or #)
The phone pad layout is
1 2 3
4 5 6
7 8 9
* 0 #
A legal move is defined as any move that would normally be legal for the piece in chess,
with the following additions:
·? ? ? ? ? ? ? ? Staying in place is a legal move for all pieces
·? ? ? ? ? ? ? ? When a Pawn reaches the top row, it becomes a Queen.
·? ? ? ? ? ? ? ? For the case where the piece is a Pawn, starting on one of the bottom two rows (i.e. any of the digits 7, 8, 9 and 0), the Pawn may move either one or two spaces forward the first time it moves .