CengBall: API (documented for version: v0.5)

MatchAssets Class

Method name Parameters Return Description
MatchAssets Ball, Pitch constructor This class represents the physics of the game. It simulates movements and collisions. Constructor for MatchAssets specifying the ball and the pitch objects.
MatchAssets Ball, Pitch, HashMap < Integer, Player[]>, HashMap< Integer, Integer> constructor Constructor for MatchAssets specifying the ball, the pitch, players and the scores.
advance int MatchAssets Function to advance the assets for given number of percepts. This function simulates the physics in the game.
clone int MatchAssets Clones this MatchAssets object parameter independently.
findMatchingPlayer Player Player Finds the player that has the same ID with the given player in this MatchAssets object.
getBall none Ball Gets the Ball object of this MatchAssets object.
getClosestPlayersToLine vector2D, vector2D, double Player[] Gets the players to the line within the given range.
getClosestPlayersToLine vector2D, vector2D, double, int Player[] Gets the players with the given team ID to the line within the given range.
getClosestPoint Double, vector2D vector2D Gets the closest point of the given rectangle to the given point.
getFrictionAcceleration none double Gets the friction acceleration value set in this MatchAssets object.
getOtherTeamID int int Gets the team ID of the opponent team of the given team.
getPitch none Pitch Gets the pitch object of this MatchAssets object.
getPlayer int Player Gets the player with the given ID in this MatchAssets object.
getPlayerClosestToBall Player[] Player Gets the player which is the closest to the ball among the given player list.
getPlayerClosestToObject Player[], vector2D Player Gets the player which is the closest to the given object among the given player list.
getPlayerList int Player[] Gets the player list with the given team ID.
getPlayers none HashMap< Integer, Player[]> Gets the player hash map.
getPlayersInArea Double Player[] Gets the players in the given area.
getPlayersInArea Double, int Player[] Gets the players that has the given team ID in the given area.
getPlayersInRange vector2D, double Player[] Gets the players in the circle specified with the range and the center.
getPlayersInRange vector2D, double, int Player[] Gets the players with the given team ID in the circle specified with the range and the center.
getScore int int Gets the score of the team with the given team ID.
getScores none HashMap< Integer, Integer> Gets the score hash map.
getTeamIDs none Integer[] Gets the team ID list.
initialize none void Initializes the MatchAssets object. Gets the first two players of the starting team to the kick off position.
isScored none boolean Checks if a team scored.
setBall Ball void Sets the ball object of this MatchAssets object.
setFrictionAcceleration double void Sets the friction acceleration value of this MatchAssets object.
setPitch Pitch void Sets the pitch object of this MatchAssets object.
setPlayers HashMap< Integer, Player[]> void Sets the player hash map.
setScores HashMap< Integer, Integer> void Sets the score hash map.
setTeams int, Player[], int, Player[] boolean Sets the teams and their players to the MatchObjects.Parameters are: team ID of the first team, player list of the first team, team ID of the second team, player list of the second team. Returns true if setting is successful; false otherwise.
stopPlayers none void Stops all the players in this object.
submitTeams int, int void Submits the teams to the MatchAssets object. Sets the goal post IDs of the pitch. Parameters are: team ID of the first team and team ID of the second team.
toString none String Properties of class object is returned for human reading. (Logging purposes)
findMatchingPlayer Player, Player[] Player Finds the player that has the same ID with the given player in this MatchAssets object.

Attribute type Attribute name Description
none none Can not be reached any attribute of this.

TODO

News from CengBall

Quick Tutorial

How to set jdk path
How to import code

Twitter

    Follow @cengball

    © Copyright - Project 11