Generation

generate functionSat, 12 Nov 2022

Navigate CSEL

void move(int direction, int distance) { switch (direction) { case 'n': current_room[Y] -= distance; break; case 's': current_room[Y] += distance; break; case 'e': current_room[X] += distance; break; case 'w': current_room[X] -= distance; break; default: throw invalid_argument("Invalid direction."); } }

Questions about programming?Chat with your personal AI assistant