+ //We have to remove the movement result tokens
+
+
+ vector<string> tokens;
+ Game::Tokenise(tokens, buffer, ' ');
+ buffer.clear();
+
+ if (tokens.size() < 1)
+ return MovementResult::BAD_RESPONSE;
+ buffer += tokens[0];
+
+
+ if (tokens[0] == "NO_MOVE") //tokens[0] is either the x coordinate, or "NO_MOVE"
+ return MovementResult::OK;
+ if (tokens.size() < 2)
+ return MovementResult::BAD_RESPONSE;
+ buffer += " ";
+ buffer += tokens[1]; //The y coordinate
+ buffer += " ";
+ buffer += tokens[2]; //The direction
+
+ //Check for a possible multiplier. If tokens[3] is an integer it will be the multiplier, otherwise it won't be.
+ if (tokens.size() > 3 && atoi(tokens[3].c_str()) != 0)
+ {
+ buffer += " ";
+ buffer += tokens[3];
+ }
+ else
+ {
+ //(tokens[3] should include a new line)
+ //buffer += "\n";
+ }
+
+
+
+
+
+