}
-
+ #ifdef BUILD_GRAPHICS
if (graphicsEnabled)
{
+
fprintf(stdout, "Click to move!\n");
SDL_Event event; int mouseClick = 0;
{
int xDist = x[1] - x[0];
int yDist = y[1] - y[0];
+ int magnitude = max(abs(xDist), abs(yDist));
if (abs(xDist) > abs(yDist))
{
if (xDist < 0)
buffer += "UP";
else
buffer += "DOWN";
+
+ if (magnitude > 1)
+ {
+ stringstream s("");
+ s << " " << magnitude;
+ buffer += s.str();
+ }
}
mouseClick++;
break;
}
}
fprintf(stdout, "Move complete!\n");
+
}
else
+ #endif //BUILD_GRAPHICS
{
buffer.clear();
for (char in = fgetc(stdin); in != '\n'; in = fgetc(stdin))