Robot

public void Robot(int x, int y)(source)

Constructs and initializes a robot at the specified (x,y) location in the coordinate space.

Parameters

x

the X coordinate of the newly constructed robot

y

the Y coordinate of the newly constructed robot


public void Robot(int x, int y, RobotFamily robotFamily)(source)

Constructs and initializes a robot at the specified (x,y) location with the viewing direction UP and 0 coins.

Parameters

x

the X coordinate of the newly constructed robot

y

the Y coordinate of the newly constructed robot

robotFamily

the family of this robot


public void Robot(int x, int y, Direction direction, int numberOfCoins)(source)

Constructs and initializes a robot at the specified (x,y) location, viewing direction and number of coins.

Parameters

x

the X coordinate of the newly constructed robot

y

the Y coordinate of the newly constructed robot

direction

the viewing direction of the newly constructed robot

numberOfCoins

the number of coins of the newly constructed robot


public void Robot(int x, int y, Direction direction, int numberOfCoins, RobotFamily robotFamily)(source)

Constructs and initializes a robot at the specified (x,y) location, viewing direction and number of coins.

Parameters

x

the X coordinate of the newly constructed robot

y

the Y coordinate of the newly constructed robot

direction

the viewing direction of the newly constructed robot

numberOfCoins

the number of coins of the newly constructed robot

robotFamily

the family of the newly constructed robot


public void Robot(KarelWorld world, int x, int y)(source)

Constructs and initializes a robot at the specified (x,y) location with the viewing direction UP and 0 coins and places it on the given world.

Parameters

world

the world to place the newly constructed robot in

x

the X coordinate of the newly constructed robot

y

the Y coordinate of the newly constructed robot


public void Robot(KarelWorld world, int x, int y, RobotFamily robotFamily)(source)

Constructs and initializes a robot at the specified (x,y) location with the viewing direction UP and 0 coins and places it on the given world.

Parameters

world

the world to place the newly constructed robot in

x

the X coordinate of the newly constructed robot

y

the Y coordinate of the newly constructed robot

robotFamily

the family of the newly constructed robot


public void Robot(KarelWorld world, int x, int y, Direction direction, int numberOfCoins)(source)

Constructs and initializes a robot at the specified (x,y) location, viewing direction, number of coins and places it on the given world.

Parameters

world

the world to place the newly constructed robot in

x

the X coordinate of the newly constructed robot

y

the Y coordinate of the newly constructed robot

direction

the viewing direction of the newly constructed robot

numberOfCoins

the number of coins of the newly constructed robot


public void Robot(KarelWorld world, int x, int y, Direction direction, int numberOfCoins, RobotFamily robotFamily)(source)

Constructs and initializes a robot at the specified (x,y) location, viewing direction, number of coins and places it on the given world.

Parameters

world

the world to place the newly constructed robot in

x

the X coordinate of the newly constructed robot

y

the Y coordinate of the newly constructed robot

direction

the viewing direction of the newly constructed robot

numberOfCoins

the number of coins of the newly constructed robot

robotFamily

the family of the newly constructed robot


protected void Robot(Robot robot)(source)

Constructs and initializes a robot with the properties of the specified robot.

Parameters

robot

the robot to copy its properties


protected void Robot(boolean copy, int x, int y, Direction direction, int numberOfCoins)(source)

Constructs and initializes a robot at the specified (x,y) location, viewing direction and number of coins.

Parameters

copy

if true then it is a copy constructor

x

the X coordinate of the newly constructed robot

y

the Y coordinate of the newly constructed robot

direction

the viewing direction of the newly constructed robot

numberOfCoins

the number of coins of the newly constructed robot