[Solved] Rewriting a conditional chain as a sequence of one-liners
This code would not compile: if (gamepad1.left_stick_y>50) mainArm.setDirection(DIRECTION_FORWARD), mainArm.setPower(50); // ^ Your attempt at converting multiple operations into one by placing a comma would not work: JLS 15.27: Unlike C and C++, the Java programming language has no comma operator. One approach is to allow changing power and direction in a single call: if (gamepad1.left_stick_y … Read more