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 backward
public static void turnLeft()
Turns your Quadruped to the left by 90 Degrees
public static void turnRight()
Turns your Quadruped to the right by 90 Degrees
public static void homePos()
Brings your quadruped back to it's home position
public static void bow()
Makes your quadruped bow a.k.a bend towards it's front side
public static void turnRight()
Makes your quadruped bend back a.k.a bend towards it's back
public static void pushUp()
Makes your quadruped do 5 pushups
public static void jumpUp()
Makes your quadruped jump up and stand on its feet
public static void jumpBack()
Makes your quadruped jump back and lie on it's back
public static void System.out.println(String text)
text: The string that you want to print
Prints 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