gandalph
asked on
KNIGHTS TOUR
I have had to summit the question again
because i cannot edit the question i set earlier cookies problem
but here it is again a bit clearer to understand i hope
Knights tour problem
I need the design for a 2d array for where the user inputs the starting position for the knight
The program then displays all the subsequent moves in rows of eight
the user inputs any postion
say 2b the program then has to display
all the 64 positions the knight will travel
from to complete its tour of the board
the result will be displayed in rows and
columns of eight
{user inputs 1a}
output
1a 3b 2d 1f 3g 2e ect
the program does not have to be a 2d array
but as i am just starting to learn what
2d arrays do i thought this would be a better way of doing it
instead of using a load of if and else statements
cheers
gandalph
because i cannot edit the question i set earlier cookies problem
but here it is again a bit clearer to understand i hope
Knights tour problem
I need the design for a 2d array for where the user inputs the starting position for the knight
The program then displays all the subsequent moves in rows of eight
the user inputs any postion
say 2b the program then has to display
all the 64 positions the knight will travel
from to complete its tour of the board
the result will be displayed in rows and
columns of eight
{user inputs 1a}
output
1a 3b 2d 1f 3g 2e ect
the program does not have to be a 2d array
but as i am just starting to learn what
2d arrays do i thought this would be a better way of doing it
instead of using a load of if and else statements
cheers
gandalph
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i have tried the 2d array but i am having loads of probs i need to set up the array so that that it shows on the user screen columns a to h & rows 1 to 8 with the rest showing zero like this
a b c d e f g h
1 0 0 0 0 0 0 0 0
2 0 0 0 0 0 0 0 0
and so on
i do not know how to set the array up so that it will show this table
also when the user inputs from any starting point say b1 the screen will then display 'x' in the table at b1
i can get a table displayed but it only shows 8 rows and 8 columns of zeros
and when user inputs say b1 the table just shows the value 1 at h8
i need some serious help with this one
any offers
gandalph
a b c d e f g h
1 0 0 0 0 0 0 0 0
2 0 0 0 0 0 0 0 0
and so on
i do not know how to set the array up so that it will show this table
also when the user inputs from any starting point say b1 the screen will then display 'x' in the table at b1
i can get a table displayed but it only shows 8 rows and 8 columns of zeros
and when user inputs say b1 the table just shows the value 1 at h8
i need some serious help with this one
any offers
gandalph
Hi! Gandalph,
i am stuck with the same problem...i was wondering if you could help in anyway.
i am stuck with the same problem...i was wondering if you could help in anyway.
ASKER
yeh hi john
sorry a bit late in answering been away
send me your email address
and i will send you some code
sorry a bit late in answering been away
send me your email address
and i will send you some code
ASKER
yeh hi john
sorry a bit late in answering been away
send me your email address
and i will send you some code
sorry a bit late in answering been away
send me your email address
and i will send you some code
ASKER
yeh hi john
sorry a bit late in answering been away
send me your email address
and i will send you some code
sorry a bit late in answering been away
send me your email address
and i will send you some code
Hi ! Gandalph ,
My email id is kolijoe@hotmail.com.
thanks
My email id is kolijoe@hotmail.com.
thanks
Hi!
I was basically looking for a solution in c++.
thanks.
I was basically looking for a solution in c++.
thanks.
Contact the help desk and specify the question number that you want deleted.
I hope that you are not asking for the algorithm to solve the problem. The other question has a comment that gives an idea of the array to hold what you want. Also especially read scrapdog's comment above.
Have fun.