Results 1 to 5 of 5
- 09-14-2009, 08:37 AM #1
Member
- Join Date
- Sep 2009
- Posts
- 4
- Rep Power
- 0
- 09-14-2009, 08:47 AM #2
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
You didn't explain what the problem with the method is.
Do you get a compilation error, run time exception, wrong results?
- 09-14-2009, 12:08 PM #3
Member
- Join Date
- Sep 2009
- Posts
- 4
- Rep Power
- 0
it compiles and runs but when i put in say the position 12, 9 it sees that there is nothing there so it returns a line length of 0, that works. but if there is say a B (black) toke at 12, 9 the method maxLength is supposed to look in each vertical, horizontal and both diagonals to find out of those directions what is the length of the longest line of B (black) tokens. instead atm it only returns a value of 1 if there is a value at the co-ords eventhough there is a B(black) token next to it making it a line of 2 tokens so it should return 2. but its not.
- 09-14-2009, 04:23 PM #4
Member
- Join Date
- Sep 2009
- Posts
- 4
- Rep Power
- 0
Now i have that working but what isnt working is the line check that does the diagonal that goes south west and north east of co-ords. Now i think i have to set rinc and cinc to 0 and the opposite is -0 . this isnt working its not returning the correct value. what value can i set rinc and cinc to check in those directions?? or is there another way?
-Thanks in advance
SOLVEDLast edited by Hardo; 09-15-2009 at 01:13 AM.
- 09-14-2009, 04:28 PM #5
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
Similar Threads
-
Learning - 2D array and method question.
By Russo in forum New To JavaReplies: 24Last Post: 09-15-2009, 08:16 AM -
Recursive method using int array, help needed
By chupalo17 in forum New To JavaReplies: 4Last Post: 09-07-2009, 11:15 PM -
Array Method Testing
By Suzanne1187 in forum Java AppletsReplies: 1Last Post: 04-15-2009, 08:23 AM -
Problem using the toUpperCase method with character array...
By lisalala in forum New To JavaReplies: 2Last Post: 02-24-2009, 04:32 PM -
Int Array Allowed in main() Method?
By Starclopsofish in forum New To JavaReplies: 19Last Post: 10-03-2008, 04:22 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks