-
Notifications
You must be signed in to change notification settings - Fork 0
GameEvaluation
CodingGlad edited this page Dec 31, 2022
·
1 revision
This method is an evaluation system that controls the whole game of Code Soccer.
This constructor is used for initialization of an evaluation system for code soccer.
It has only one restriction and that is that it needs two opponents of different GaolLocationType. If this restriction isn't fulfilled, an IllegalStateException is thrown.
-
Parameters:
-
game— template that evaluation system has to follow. -
opponentTop— player whose goal is located on top of the field. -
opponentBottom— player whose goal is located on bottom of the field.
-
Method used to start the game.
- Returns: winner of finished game
Method for informing players about their turns.
-
Parameters:
turn— whose purpose is to identify which players turn it is.
Method for changing turn of both players based on the bounce mechanic.
-
Parameters:
-
turn— which represents which players turn it is -
point— which bounce is checked in order to correctly change players
-
- Returns: boolean representation of next players turn
Method that checks whether a game has fulfilled requirements for an end.
-
Parameters:
-
turn— that represents whose turn it is. -
destination— of a ball.
-
- Returns: 1 if top player won, -1 if bottom player won, otherwise 0.