![]() |
|
#1
|
|||
|
|||
2 dimensional arrays and number generatingThank you for your help. We were able to figure out a method that works and follows our guidelines. I now have to create a chess senario with 1 queen and 1 pawn using 2 dimensional arrays and number generating. I don't want u to code it for me, but i was wondering if you could explain how to encorporate 2D arrays into a program, and how they work. Thank you!
|
|||
|
#2
|
||||
|
||||
Re: Converting Octal to Decimal and then Decimal to OctalHere's a small example that fills and displays a 2D array within the program:
JAVA Code:
Code:
__________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#3
|
|||
|
|||
Re: Converting Octal to Decimal and then Decimal to Octalawesome.... thank you, i have another question. this is our code so far
JAVA Code:
print out: Code:
as of now our 8x8 board is being displayed with "-"...... we r striving to have each space print as a box with straight lines on each side and lines on top and bottom but no brackets if you could help us figure out how to do that using the code we already have, that would be cool. also we were a little confused as to how to relate the diagonal positions of the pieces, we know what to do if the are in the same row or column but what about diagonally?? Last edited by admin : 18-Nov-2009 at 06:58.
Reason: Please insert your example Java codes between [JAVA] and [/JAVA] tags
|
|
#4
|
||||
|
||||
Re: Converting Octal to Decimal and then Decimal to OctalNote to moderator:
This thread should probably be split now, starting from #9, as the topic has shifted to "Two Dimensional Arrays" (then delete this post) Thank you, TurboPT. Your wish is my command. Thread split from here. Admin. __________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#5
|
||||
|
||||
Re: Converting Octal to Decimal and then Decimal to OctalQuote:
JAVA Code:
Quote:
Code:
So, for example, upper left diagonal checking from the queen is: x/y: 2,3 x/y: 1,2 x/y: 0,1 Need to stop here, x < 0 (in this specific direction) will be out of bounds! __________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
|
#6
|
|||
|
|||
Re: Converting Octal to Decimal and then Decimal to OctalQuote:
yes u r right.... i would definetly do that except i really don't know how : /..... |
|
#7
|
||||
|
||||
Re: Converting Octal to Decimal and then Decimal to OctalQuote:
__________________
Use the force...read the source!! WYCIWYG -- what you code is what you get! |
Recent GIDBlog
Not selected for officer school by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Convert row elements from two dimensional array to one dimensional arrays | ahmetemir | MS Visual C++ / MFC Forum | 0 | 01-Feb-2009 04:08 |
| Need Help with input files. | Efferus | C++ Forum | 2 | 24-Nov-2007 16:19 |
| Fgets() in two dimensional arrays - C | projectwoa | C Programming Language | 2 | 17-Apr-2007 00:02 |
| comparing multiple character arrays in C | alucard | C Programming Language | 4 | 03-Feb-2006 00:47 |
| two dimensional arrays in C | seabreeze | C Programming Language | 5 | 21-Aug-2005 11:35 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The