Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 04-27-2004, 05:16 AM   #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...
Benjie Solleza is offline   Reply With Quote
Old 04-27-2004, 05:29 PM   #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.
mattg2k4 is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 12:53 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2