Returns the type of the tile in GridType
format specified by given coordinates.
Returns the type of the tile in GridType
format specified by given coordinates.
the x-coordinate of needed tile
the y-coordinate of needed tile
type of the needed tile as GridType
object
Helping method that tells if the game is ended.
Helping method that tells if the game is ended. Game end when the PLAYER
GOAL.
true
if the game has finished, otherwise false
Moves the player in the specified location (if it is possible).
Moves the player in the specified location (if it is possible). The method takes care that the state of the field (including players moves and possible obstacle moves) and players position is updated.
the x-coordinate where player is trying to move
the y-coordinate where player is trying to move
true
if move successful, otherwise false
Another version of startOver
method that takes a new game field file as an
argument.
Another version of startOver
method that takes a new game field file as an
argument. The game is started from the state that the new file specifies.
the file containing details of the new field
Returns the state of the game field to the state that it was in the beginning of the game.
Returns the state of the game field to the state that it was in the beginning of the game. The player starts from the initial place and all obstacles are in the original positions.