| Modifier and Type | Method and Description |
|---|---|
static void |
moveForward()
|
static void |
moveBackward()
|
static void |
turnLeft()
|
static void |
turnRight()
|
static void |
homePos()
|
static void |
bow()
|
static void |
bendBack()
|
static void |
pushUp()
|
static void |
jumpUp()
|
static void |
jumpBack()
|
static void |
System.out.println(String text)
|
public static void moveForward()
Moves your Quadruped one step forward.public static void moveBackward()
Moves your Quadruped 1 step backwardpublic static void turnLeft()
Turns your Quadruped to the left by 90 Degreespublic static void turnRight()
Turns your Quadruped to the right by 90 Degreespublic static void homePos()
Brings your quadruped back to it's home positionpublic static void bow()
Makes your quadruped bow a.k.a bend towards it's front sidepublic static void turnRight()
Makes your quadruped bend back a.k.a bend towards it's backpublic static void pushUp()
Makes your quadruped do 5 pushupspublic static void jumpUp()
Makes your quadruped jump up and stand on its feetpublic static void jumpBack()
Makes your quadruped jump back and lie on it's backpublic static void System.out.println(String text)
text: The string that you want to printPrints the string supplied as a parameter in the terminal| Condition or Loop | Description |
|---|---|
if
|
Only if something (parameter) is true, then execute the code under the loop |
if(boolean test)
if something (parameter) is true, then execute the code in between the brackets
Code
Output
bool test = true;
if test {System.out.println("true")};
true
bool test = false;
if test {System.out.println("false")};
(no output)
Integer
Use the keyword int befor declaring an integer variable. Example: int example = 5;
Code
Output
int example = 5;
System.out.println(example);
5
Boolean
Use the keyword bool before declaring the variable. Example: bool test = true;
Code
Output
bool test = true;
System.out.println(test);
true