Computer Chess Club Archives


Search

Terms

Messages

Subject: Follow up - Question Chess Programming

Author: Joshua Haglund

Date: 22:28:07 01/07/03

Go up one level in this thread


On January 07, 2003 at 18:36:33, Russell Reagan wrote:

>On January 07, 2003 at 18:13:27, Joshua Haglund wrote:
>
>>I have a question with the follow code:
>>
>>#include <iostream>
>>#include <string>
>>using namespace std;
>>
>>int move() {
>>
>>string move[5] { "e2e4", "d2d4", "c2c4", "g1f3", "b1c3"
>>};
>>
>>int score[5] { 10, 9, 8, 5, 4
>>};
>>
>>Now I want to pass the score of score[0] by reference &score[0] with the string
>>move[0].
>>
>>Examples:
>>
>>move[0] = 10
>>move[1] = 9
>>
>>etc...
>>
>>Eventually I want to
>>
>>cout << m << endl; // m being  e2e4.
>>
>>I'm not sure how to write this.
>>
>>Any help would be nice!
>>
>>Thanks,
>>
>>Joshua
>>toneewa@yahoo.com
>
>What are you trying to do? Are you trying to output the move with the highest
>score? Give a little more detail about what you are trying to achieve. So far
>you have just thrown some code out and vaguely stated that you don't know how to
>do "this" (not sure what "this" is).

Now I want to pass the score of score[0] by reference &score[0] with the string
move[0].

Does that help?

Joshua
toneewa@yahoo.com



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.