How to use a double subscripted array to represent a chess board
| guiyii (9) |
|
|
Just like the title.thanks!
|
|
|
| guiyii (9) |
|
|
but i think i need to actually create a chess board with "|"and"--"
|
|
|
| TheIdeasMan (1564) |
|
You can use nested for loops to do that.
I would imagine nested for loops is the way you are going to do everything with your board.
|
|
|
| guiyii (9) |
|
|
but then why do i still need to use array?
|
|
|
| guiyii (9) |
|
|
I was thinking if i use nested for loop,i could do this without using the array,is that right?
|
|
|
| TheIdeasMan (1564) |
|
|
You could print the outline of the board, but you need the array to store which pieces occupy which spots on the board.
|
|
|
| guiyii (9) |
|
that sounds reasonable.
I will try it.thanks for your help!
|
|
|
Topic archived. No new replies allowed.