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 Type
    Method
    Description
    int
    Gets the starting x-coordinate of the player model.
    int
    Gets the starting y-coordinate of the player model.
    int
    Gets the current x-coordinate of the player model.
    int
    Gets the current y-coordinate of the player model.
    void
    move(int dx, int dy)
    Moves the player model by the specified delta values.
    void
    setPosition(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.