I'm working on a simple chat bot program that has bots that chat with each other. Currently, each bot can either insult or compliment other bots.
Now I want to make it so that each bot can remember all the moves it has received from the other bots. Say there are four bots. I'm thinking each bot will have a vector that will contain all the moves it receives from each of the other bots. So after say, three rounds, the vector will look something like this, with 5 representing a compliment and -5 an insult:
0, 0, 0, -5
0, 0, 0, 5
0, 5, 0, 5
I looked up some other threads on this board but I couldn't figure out what to do to get that kind of thing working from them. My current code is this, but it doesn't work:
Any help would be greatly appreciated! Thanks.Code:typedef vector<int> receivedmoves(4, 0); vector<receivedmoves> allreceivedmoves; receivedmoves receivedmoves1; receivedmoves1.push_back(0, 0, 0, -5); allreceivedmoves.push_back(receivedmoves1);