Interface IPlayerModel
- All Known Implementing Classes:
AiModel,PlayerModel
public interface IPlayerModel
Interface for PlayerModel.
Specifies the methods that should be unique to the PlayerModel.
These include methods for movement, setting position, and getting start and current coordinates.
-
Method Summary
Modifier and TypeMethodDescriptionintGets the starting x-coordinate of the player model.intGets the starting y-coordinate of the player model.intgetX()Gets the current x-coordinate of the player model.intgetY()Gets the current y-coordinate of the player model.voidmove(int dx, int dy) Moves the player model by the specified delta values.voidsetPosition(int x, int y) Sets the position of the player model to the specified coordinates.
-
Method Details
-
getStartX
int getStartX()Gets the starting x-coordinate of the player model.- Returns:
- The starting x-coordinate.
-
getStartY
int getStartY()Gets the starting y-coordinate of the player model.- Returns:
- The starting y-coordinate.
-
move
void move(int dx, int dy) Moves the player model by the specified delta values.- Parameters:
dx- The delta x value.dy- The delta y value.
-
setPosition
void setPosition(int x, int y) Sets the position of the player model to the specified coordinates.- Parameters:
x- The x-coordinate to set.y- The y-coordinate to set.
-
getX
int getX()Gets the current x-coordinate of the player model.- Returns:
- The current x-coordinate.
-
getY
int getY()Gets the current y-coordinate of the player model.- Returns:
- The current y-coordinate.
-