Computer Science Canada 2 player chess |
Author: | A.J [ 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) |
Author: | CodeMonkey2000 [ 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. |
Author: | Clayton [ 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. |
Author: | CodeMonkey2000 [ Sun Apr 27, 2008 9:23 pm ] |
Post subject: | RE:2 player chess |
How did you do that? |
Author: | Clayton [ Sun Apr 27, 2008 9:26 pm ] |
Post subject: | RE:2 player chess |
I ran the code |
Author: | zylum [ 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. |
Author: | Tallguy [ 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 |
Author: | Clayton [ 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 |
Author: | Nick [ Mon Apr 28, 2008 2:17 pm ] |
Post subject: | RE:2 player chess |
I did... it crashed... |
Author: | A.J [ 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) |
Author: | Saad [ 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 |
Author: | nike52 [ Mon Apr 28, 2008 8:54 pm ] |
Post subject: | Re: 2 player chess |
chess. awesome ! i gotta make me chess sometime |
Author: | [Gandalf] [ 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. |
Author: | repsoccer16 [ 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. |