|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (6 bit)
Join Date: Jan 2004
Posts: 35
|
chess program in java
hi, I need some help from someone who is generous enough. I'm taking up Java Programming and my instructor gave as a case study on a simple java appilication about chess that can run on the c:\ prompt, we are actually on our 2nd week. And Iwould really appreciate if someone could play a good Samaritan to me by giving a simple java application program that I can pattern my work on. Thanks in advance...
|
|
|
|
|
|
#2 |
|
Member (10 bit)
Join Date: Jul 2002
Location: University of California, Santa Barbara
Posts: 800
|
Do you have to program a computer opponent or is it for 2 players?
If it's for two player gaming, it shouldn't be very hard. Just a 2 dimensional array filled with chess pieces that two players can alternately move, and a display function. Depending on the project's requirements you might not even need to check if a move is legal. Determining when a king is checked would be a relatively simple case of checking all of the opponents pieces could move to and comparing it to the king's position. Checkmate will be the hardest, because the king cannot move in any place to avoid the check, and no piece can move to block a checking opponent's piece. You'll have a hard time finding a java app that you can neatly pattern your code on without running the risk of plagiarism, and you'll have more fun and learn more doing it yourself anyway. Last edited by mattg2k4; 04-27-2004 at 05:34 PM. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|