Results 1 to 1 of 1
Thread: simple game programming help
- 11-25-2010, 05:16 PM #1
Member
- Join Date
- Nov 2010
- Posts
- 12
- Rep Power
- 0
simple game programming help
Hi,
i'm trying to do a chess game, not exactly a real one with all the rules, but almost.
First i have to make the board, fill it with all the chess figures and then move these figures without any rule, except the bishop. This one has to have the rules how to move.
well my problem is that i have done all of that, but i'm having problem how to implement a method to end the program when i give the same inputs.
for exp. when i pres 1|1- 1|1 the program should end.
Anybody has an idea?
i tried to do it like this
and then on the users class when i have to give the comandsJava Code:private boolean exit; public void setexit(); { boolean exit=true;}
i write
but what my programs does is,Java Code:while (user1 ends move) {scan cordinates if(row==dRow||col=dCol){ //row&col(state for coordinates of the figure that i want to move) and dRow&dCol for the end position exit=true;} }
if 1player gives these coordinate then it passes the turn to the 2nd player,
but i don't want that.....
Please if anybody has any idea i would really appreciate it
Similar Threads
-
programming a game - how should I begin
By gib65 in forum New To JavaReplies: 5Last Post: 06-21-2010, 05:54 PM -
Programming a Board Game
By makanti in forum New To JavaReplies: 7Last Post: 03-10-2009, 02:32 AM -
The words *game* in java programming :confused:
By ibmzz in forum Advanced JavaReplies: 1Last Post: 01-23-2008, 09:23 AM -
Programming a Game?
By gt123 in forum New To JavaReplies: 4Last Post: 01-01-2008, 12:41 PM -
java game programming
By gammaman in forum New To JavaReplies: 1Last Post: 12-25-2007, 01:01 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks