Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

[C++] Chess game Terminal

Name: Snake4D 2012-01-11 12:05

Hi,
I'm trying to make a little chess game,
in C++, is in terminal because still I don't know a good GUI package for C++ sorry I'm n00b...

btw I got to print out the board:
like this:
[code]
-|--a-|--b-|--c-|--d-|--e-|--f-|--g-|--h-|
8|-bR-|+bk+|-bB-|+bQ+|-bK-|+bB+|-bk-|+bR+|
7|+bP+|-bP-|+bP+|-bP-|+bP+|-bP-|+bP+|-bP-|
6|----|+--+|----|+--+|----|+--+|----|+--+|
5|+--+|----|+--+|----|+--+|----|+--+|----|
4|----|+--+|----|+--+|----|+--+|----|+--+|
3|+--+|----|+--+|----|+--+|----|+--+|----|
2|-wP-|+wP+|-wP-|+wP+|-wP-|+wP+|-wP-|+wP+|
1|+wR+|-wk-|+wB+|-wQ-|+wK+|-wB-|+wk+|-wR-|
[\code]

and one can tell like in chess with the sentence "(e2:e4)" to move the piece from e2 to e4

but now what I need to make a AI?
I'll paste the code in pastebin so you can have a look:

Name: Anonymous 2012-01-11 13:37

>>38
The checkers AI engine that I use on Yahoo needs both a strong opening engine and a strong closing one. For reasons that I don't understand, I can't have both.

Name: Anonymous 2012-01-11 13:39

Kodak seems a lot less suicidal today, I think he has taken his pills.

Name: Anonymous 2012-01-11 13:39

>>38
I has no idea, I left high-school a while ago and propar grammuh is leafing me with every second.

Name: Anonymous 2012-01-11 13:40

>>43
Now your spelling is incorrect.

Name: Alpha Male !gD3Op2fhHs 2012-01-11 13:44

Snake4d brah, I just wanted to let you know that you should keep doing what you're doing, haters gonna hate.

Name: Anonymous 2012-01-11 13:49

So Kodak is being nice and helpful. Some other dude is spamming a thread about undefined behavior. Nobody is being called mental midgets who should scrub another toilet, tell me, is this bizarro /prog/?

Sorry for shitting up your thread Snake4d.

Name: Anonymous 2012-01-11 13:52

>>46
Is this the real life? Is this just fantasy?

Name: Anonymous 2012-01-11 13:54

>>46
The weird part is that the imageboards are up.

On topic:
Since op is doing it in a terminal means its super-basic.
He should just make something that moves the pieces randomly
unless a piece can score or is in imminent peril.

Name: Anonymous 2012-01-11 14:01

>>48
How does terminal imply super-basic?

Name: Anonymous 2012-01-11 14:04

>>49
Excluding 'in-house' testing.
Silly embedded software.
Basic school projects.
When was the last time you made a purely console app requiring more than 3 inputs?

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2012-01-11 14:09

>>49
>>48 doesn't know what he/she/it's talking about. Maybe it should shut up and go scrub a toilet.

Name: Anonymous 2012-01-11 14:11

>>51
Maybe it should shut up and go scrub a toilet
Now we're talking.

Name: kodak_gallery_programer !!kCq+A64Losi56ze 2012-01-11 14:12

>>50
A lot of OS's make a distinction between the terminal and the console. But I wouldn't expect a mental midget like yourself to know such a subtle, but important difference.

Name: Anonymous 2012-01-11 14:12

Ahh yeah.

Name: Anonymous 2012-01-11 14:14

>>53
But I wouldn't expect a mental midget like yourself to know such a subtle, but important difference.
Kodak-kun, welcome back.

Name: Anonymous 2012-01-11 14:16

He managed to stay nice for over an hour, that's impressive.

Name: Anonymous 2012-01-11 14:17

>>53
This is like the time with char[] not being a string.
So discerning blue from indigo is the only thing you get right.
Are you by any chance a woman?

Name: Anonymous 2012-01-11 14:18

appropriately named chess engine is appropriate: -

http://www.glaurungchess.com/viper/

failing that

google 'chess engines'

Name: Anonymous 2012-01-11 14:20

>>57
This one is fighting back, you're in for one helluva ride bro.

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2012-01-11 14:23

>>57
And what happens if I do something like

int getline(char s[], int lim) {
  for(i = 0; i<lim-1 && (c = getchar()) != EOF && c !='\n'; i++)
    s[i]=c;
}

Is s[] still a string you mental  midget? The answer is no because there is no '\0'. Now go scrub another toilet you fucking idiot.

Name: Anonymous 2012-01-11 14:24

>>60
Well first you would have to declare "i".

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2012-01-11 14:27

>>57
Also, what happens if the underlying device is a socket()? How do you see fucking output? That is why some operating systems make a distinction between the terminal and the console.

Again, you're stupid. And again, you have no real future as a computer programmer.

Name: Anonymous 2012-01-11 14:28

>>60
Now go scrub another toilet you fucking idiot.

Sure is kodak.

Name: kodak_galleryprogrammer !!kCq+A64Losi56ze 2012-01-11 14:29

>>61
Well, in this case, 'i' would have what is known as 'external linkage'. In other words, I wouldn't have to declare it in this function.

Name: Anonymous 2012-01-11 14:30

>>63
Look up the defintion of a "string" in one of the ANSI/ISO C standards you retard.

Name: Anonymous 2012-01-11 14:31

>>64
Why not just use a static int i at the beginning of your file?

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2012-01-11 14:32

>>63
More on less, in C, a string is an array of characters followed by a '\0'. In this case I don't have a '\0'. Therefore it's not a string. Now shut up and quit arguing with me. Unlike you, I work as a programmer.

Name: Anonymous 2012-01-11 14:33

>>65

LOL what? I'm not even part of this string debate.
off me.

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2012-01-11 14:33

>>66
Standard industry practices dictate that such crap has to be confined to a seperate header file.

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2012-01-11 14:35

>>68
Well, I can't tell you from the idiot computer science major who can't land a programming job.

Name: Anonymous 2012-01-11 14:36

>>70
He just wrote LOL so you can tell him off for that.

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2012-01-11 14:39

My bad. You're right. It would have to at the top of the file (and not in a different header file).

Name: Anonymous 2012-01-11 14:40

>>1-71

go scrub a toilet you mental midget

Name: >>57 2012-01-11 14:46

>>60
Look, that does not change the fact that in most(alert:inaccurate term) cases char[] represents strings and as such can be reffered to in that manner.

Also
[x] Likes attention
[x] Evades inconvenient anwsers
[x] Overemphesizes subtle differences
[x] Vengful
Hell hath no fury like a kodak scron
[x] Never admits being wrong.

kodak is gurl, srsly, my waito knights instinct cannot into arguments with gurls, so I concede defeat.

Name: kodak_gallery_programmer !!kCq+A64Losi56ze 2012-01-11 14:51

>>74
But you keep asserting "char[] represnts strings" as absolute truth, when in realiy isn't. Again, you're stupid. And again, I don't think you have any possible future as a computer programmer.

Name: Anonymous 2012-01-11 14:57

>>72
Did Kodak just admit to being wrong? That's a small step for Kodak-san and a huge leap for /prog/.

Name: Anonymous 2012-01-11 14:59

>>76
But I'm right about everything else -).

Name: Anonymous 2012-01-11 15:01

>>12
21<<

Name: Anonymous 2012-01-11 15:02

>>77
I never questioned that.

Name: Anonymous 2012-01-11 15:33

>>74,75
most cases == absolute truth
I think this might be the subset problem again.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List