Skip to content

HumanOpponent

CodingGlad edited this page Dec 31, 2022 · 1 revision

public class HumanOpponent implements Opponent

This opponent is used as a form of human input. It can be used to try the game on your own.

@Override public FieldPoint makeMove(SoccerGame game)

Method used for receiving of a move from human from console.

  • Parameters: game — of current game.
  • Returns: destination point.

public OpponentType getType()

Getter for value of OpponentType.

  • Returns: type of OpponentType.

public String getName()

Getter for name of opponent.

  • Returns: String name of opponent.

@Override public GoalLocationType getGoalLocation()

Getter for value of GoalLocation.

  • Returns: type of GoalLocationType.

Clone this wiki locally