chess

hi , i m trying to move and place chess pieces on the board... can anyone get me started?
[96 byte] By [englandRulesa] at [2007-11-26 13:52:13]
# 1
http://java.sun.com/docs/books/tutorial/uiswing/
sabre150a at 2007-7-8 1:29:50 > top of Java-index,Java Essentials,New To Java...
# 2
um... yeah but u c i just need someone to tell me how to get started.. (i.e. move a pawn one space in front) i just need something as simple as that
englandRulesa at 2007-7-8 1:29:50 > top of Java-index,Java Essentials,New To Java...
# 3

> um... yeah but u c i just need someone to tell me how

> to get started.. (i.e. move a pawn one space in

> front) i just need something as simple as that

Build a model of the chess board. Place the chess pieces on the board. Given the position of a pawn you wish to move, determine if the pawn can be moved. If so then move it.

sabre150a at 2007-7-8 1:29:50 > top of Java-index,Java Essentials,New To Java...
# 4
i mean like can u show me a simple code to do it plz many thank
englandRulesa at 2007-7-8 1:29:50 > top of Java-index,Java Essentials,New To Java...
# 5
> i mean like can u show me a simple code to do it plz> Come off it! What makes you think it is simple? You are not ready for this project.
sabre150a at 2007-7-8 1:29:50 > top of Java-index,Java Essentials,New To Java...
# 6
nononono i didnt mean simple by that... i mean like is there a code to show me how to move a piece... so i can use it as a reference and continue with my project
englandRulesa at 2007-7-8 1:29:50 > top of Java-index,Java Essentials,New To Java...
# 7

> nononono i didnt mean simple by that... i mean like

> is there a code to show me how to move a piece... so

> i can use it as a reference and continue with my

> project

"Moving a piece" involves lots of elements and steps. What part of it is giving you trouble? If the answer is "all of it," then go through the tutorial that was linked earlier, and probably one or more of these:

[url=http://java.sun.com/docs/books/tutorial/]Sun's basic Java tutorial[/url]

[url=http://java.sun.com/learning/new2java/index.html]Sun's New To Java Center[/url]. Includes an overview of what Java is, instructions for setting up Java, an intro to programming (that includes links to the above tutorial or to parts of it), quizzes, a list of resources, and info on certification and courses.

[url=http://javaalmanac.com]http://javaalmanac.com[/url]. A couple dozen code examples that supplement [url=http://www.amazon.com/exec/obidos/tg/detail/-/0201752808?v=glance]The Java Developers Almanac[/url].

[url=http://www.jguru.com]jGuru[/url]. A general Java resource site. Includes FAQs, forums, courses, more.

[url=http://www.javaranch.com]JavaRanch[/url]. To quote the tagline on their homepage: "a friendly place for Java greenhorns." FAQs, forums (moderated, I believe), sample code, all kinds of goodies for newbies. From what I've heard, they live up to the "friendly" claim.

Bruce Eckel's [url=http://mindview.net/Books/DownloadSites]Thinking in Java[/url] (Available online.)

Joshua Bloch's [url=http://www.amazon.co.uk/exec/obidos/Author=Bloch,%20Josh]Effective Java[/url]

Bert Bates and Kathy Sierra's [url=http://www.amazon.com/exec/obidos/tg/detail/-/0596004656?v=glance]Head First Java[/url].

James Gosling's [url=http://www.bookpool.com/sm/0321349806]The Java Programming Language[/url]. Gosling is

the creator of Java. It doesn't get much more authoratative than this.

jverda at 2007-7-8 1:29:50 > top of Java-index,Java Essentials,New To Java...
# 8
ok. well, i used mousePressed to indicate which button(piece) was pressed. then i m trying to make it click to a empty square and place it there. is there anyway i can do that
englandRulesa at 2007-7-8 1:29:50 > top of Java-index,Java Essentials,New To Java...
# 9
If 'en passant'y += 1, x += 1 or x -= 1 removing 'en passant' pawnelse if pawn takes piecey += 1, x += 1 or x -= 1 removing pieceelsey += 1So what model are you going to use to implement this?
sabre150a at 2007-7-8 1:29:50 > top of Java-index,Java Essentials,New To Java...
# 10
i know that... wat i am trying to say is i want the user to click on his/her desired piece, and choose a location and drop it there, get it?
englandRulesa at 2007-7-8 1:29:50 > top of Java-index,Java Essentials,New To Java...
# 11
> i know that... wat i am trying to say is i want the> user to click on his/her desired piece, and choose a> location and drop it there, get it?You are asking for too much.
sabre150a at 2007-7-8 1:29:50 > top of Java-index,Java Essentials,New To Java...
# 12
can you please help me... that will be my final question if u can solve it. Promise
englandRulesa at 2007-7-8 1:29:50 > top of Java-index,Java Essentials,New To Java...
# 13

> can you please help me... that will be my final

> question if u can solve it. Promise

That's a hollow promise. If you refuse to learn, then you won't be able to do the next step.

Do your own work. There are plenty of examples in the documents referenced earlier. Learn at least a little and if you have a specific question (not just "do it for me") ask then.

paulcwa at 2007-7-8 1:29:50 > top of Java-index,Java Essentials,New To Java...
# 14
Here's a hint: break up the single step "move a piece" into smaller steps. If you want to move a pawn from a2 to a4, the display is going to change as a result, right? So figure out what changes happen (yes, there is more than one change) and write code that achieves that.
DrClapa at 2007-7-8 1:29:50 > top of Java-index,Java Essentials,New To Java...