Author |
Message |
A.J
|
Posted: Sun Apr 27, 2008 7:07 pm Post subject: 2 player chess |
|
|
This is an unfinished Chess program.
I managed to finish 95% of the program (everything except for some of the checkmate procedure. So you might get checkmated when it isn't a checkmate).
I'll fix after making the AI, so I can use the AI to check if it is checkmate.
I'm pretty sure there are A LOT of bugs, but please bear with me.
Comments are appreciated.
(P.S: press the 'q' key on the keyboard, not the 'r' key, to show that you have lost)
Description: |
|
Download |
Filename: |
Chess.zip |
Filesize: |
444.15 KB |
Downloaded: |
393 Time(s) |
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
CodeMonkey2000
|
Posted: Sun Apr 27, 2008 8:31 pm Post subject: RE:2 player chess |
|
|
Why oh why are you not using classes? Using an abstract base class for a piece and then inheriting the base class for king, pawns etc. would be so much easier.
|
|
|
|
|
|
Clayton
|
Posted: Sun Apr 27, 2008 9:18 pm Post subject: Re: 2 player chess |
|
|
Just because I'm in Windows, I decided to check this out. I'm going to let this image give you one problem, and you can try and figure out what it is.
Description: |
|
Filesize: |
47.3 KB |
Viewed: |
170 Time(s) |
|
|
|
|
|
|
|
CodeMonkey2000
|
Posted: Sun Apr 27, 2008 9:23 pm Post subject: RE:2 player chess |
|
|
How did you do that?
|
|
|
|
|
|
Clayton
|
Posted: Sun Apr 27, 2008 9:26 pm Post subject: RE:2 player chess |
|
|
I ran the code
|
|
|
|
|
|
zylum
|
Posted: Sun Apr 27, 2008 11:29 pm Post subject: RE:2 player chess |
|
|
If youre going to be making an ai, classes and such are definitely not the way to go.. Way too much overhead, especially in turing. I would suggest bitboards, but turing doesnt support 64 bit datatypes.. Maybe you can get away using 2 nats, try it out.
|
|
|
|
|
|
Tallguy
|
Posted: Mon Apr 28, 2008 8:28 am Post subject: Re: 2 player chess |
|
|
Clayton wrote:
Just because I'm in Windows, I decided to check this out. I'm going to let this image give you one problem, and you can try and figure out what it is.
you went to the wrong folder, run the .exe in the pictures folder, not the one in the gif folder
same thing happened to me lol
|
|
|
|
|
|
Clayton
|
Posted: Mon Apr 28, 2008 1:56 pm Post subject: Re: 2 player chess |
|
|
Tallguy @ Mon Apr 28, 2008 8:28 am wrote: Clayton wrote:
Just because I'm in Windows, I decided to check this out. I'm going to let this image give you one problem, and you can try and figure out what it is.
you went to the wrong folder, run the .exe in the pictures folder, not the one in the gif folder
same thing happened to me lol I don't run random .exe's
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
Nick
|
Posted: Mon Apr 28, 2008 2:17 pm Post subject: RE:2 player chess |
|
|
I did... it crashed...
|
|
|
|
|
|
A.J
|
Posted: Mon Apr 28, 2008 8:49 pm Post subject: Re: 2 player chess |
|
|
sry for the trouble guys!
here is the updated version
I still have ot add the 'promotion' part, when the pawn reaches the end of the other side of the board.
I'm going to add the checkmate AFTER making the AI (so that I can use the AI to determine if it is a checkmate or not for the player)
Description: |
|
Download |
Filename: |
Chess.zip |
Filesize: |
400.28 KB |
Downloaded: |
160 Time(s) |
|
|
|
|
|
|
Saad
|
Posted: Mon Apr 28, 2008 8:54 pm Post subject: Re: 2 player chess |
|
|
A.J @ Mon Apr 28, 2008 8:49 pm wrote: sry for the trouble guys!
here is the updated version
I still have ot add the 'promotion' part, when the pawn reaches the end of the other side of the board.
I'm going to add the checkmate AFTER making the AI (so that I can use the AI to determine if it is a checkmate or not for the player)
Again like I told you before. Post the code and people can be helpful. Choose not to and you loose on some great way to improve code. Just my 2c
|
|
|
|
|
|
nike52
|
Posted: Mon Apr 28, 2008 8:54 pm Post subject: Re: 2 player chess |
|
|
chess. awesome ! i gotta make me chess sometime
|
|
|
|
|
|
[Gandalf]
|
Posted: Mon Apr 28, 2008 10:18 pm Post subject: RE:2 player chess |
|
|
Now that you have check working, I don't see why checkmate is a problem... If there are no possible moves for the side to move and it is a check then that player is checkmated. No AI involved.
Well done on en passant and more obscure rules such as castling through a check.
I can't imagine you getting more than a 5/6 ply search done in Turing, even with heavy pruning.
Oh, and if you're looking for efficient board representation there's alternatives to bitboards that don't rely on 64 bit data types.
|
|
|
|
|
|
repsoccer16
|
Posted: Tue Apr 29, 2008 8:21 am Post subject: RE:2 player chess |
|
|
ya the checkmate shouldn't be hard to add in now that you have check done so put that in then put in A.I...also i agree with Saad..alot of the people on here are quite helpful and could teach you some stuff that could make you better at turing and make more detailed and fun programs if you'd like.
|
|
|
|
|
|
|