Author
chess game ;array_bug ;selection_of_pieces_in_chess_game
mundva wala
Greenhorn
Joined: Jul 02, 2010
Posts: 6
hey guys ...i am making a project of "CHESS GAME".....
in which to identify any pieces of chess board ,i had used described mechanism....(see code of array)
...
but it actually not working...it takes garbage value...it is working only for the "Rook"...
i can't understand this behavior...so please help me 2 find out d bugs..
you can also give some more efficient mechanism for identify the piece on chess board...
if you know any thing which can help me to make chess game then please post it...hurry up!!
thank you...
mundvawala
array code(jst for idea);
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
posted Jul 02, 2010 02:04:12
0
> so please help me 2 find out d bugs..
generally, line 42 produces the most bugs
Darryl Burke
Bartender
Joined: May 03, 2008
Posts: 4167
Crossposter!
http://forums.sun.com/thread.jspa?threadID=5443768
luck, db
There are no new questions, but there may be new answers.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35258
posted Jul 02, 2010 03:25:08
0
Please read HowToAskQuestionsOnJavaRanch , particularly BeForthrightWhenCrossPostingToOtherSites .
Android apps – ImageJ plugins – Java web charts
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
posted Jul 02, 2010 05:28:28
0
> hey guys ...i am making a project of "CHESS GAME".....
...deleted
[edit]
> Please BeNice .. There is no need to be condescending.
point taken, post amended (but it was amusing writing/posting it)
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
Please BeNice .. There is no need to be condescending. Not everybody is as good as you or I
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
mundva wala
Greenhorn
Joined: Jul 02, 2010
Posts: 6
sorry to all of you...
it happened only because it was my first post....in future it will never happened..
thank you...
but anyone please help me to develop chess game....that how i should have to select the particular chess pieces ....
thank you
Saifuddin Merchant
Ranch Hand
Joined: Feb 08, 2009
Posts: 576
Code looks good to me. I mean it "should" print out the Strings. So where did you not get the String ? Whats the output you get?
Cheers - Sam.
Twisters - The new age Java Quiz || My Blog
mundva wala
Greenhorn
Joined: Jul 02, 2010
Posts: 6
@sam Mercs: thank you very much sir.....
it gives the output like
"
bRook
bPawn
null
null
null
null
wRook
wPawn
exception in thread "main" java.lang.arrayindexofboundexception
"
bt i think it should have to print all the elements of array like bRook,bKnight,bBishop...etc
mr.holmes
Saifuddin Merchant
Ranch Hand
Joined: Feb 08, 2009
Posts: 576
No exception in the code you provided. Maybe the exception is because of some other part in the code.
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
"mr holmes", please read your private messages regarding an important announcement.
subject: chess game ;array_bug ;selection_of_pieces_in_chess_game