Skip to content

Inter‐Planetary Travel

Vu Khanh Vy Ho edited this page Aug 30, 2023 · 2 revisions

When moving from planet to planet, during the transaction, the player enters a specified minigame for that round. If the minigames are completed, the users can move to the next planet. Class PlanetTravel manages the progress of travelling between planets and spawns the correct minigames for each round together with updating the state of the game.

Warning

This implementation needs to be completed since no information about class Planet (Map Team responsible), may need to modify in the future.

Usage

1. Import the PlanetTravel

Import the PlanetTravel class into your Java project:

import com.csse3200.game.services.PlanetTravel;

2. Initialization:

Initialize the PlanetTravel instance, may need to be modified in future when the minigame system is completed.

PlanetTravel planetTravel = new planetTravel(Gdx game):

3. Travel to a new planet and update the game state:

Since the planet class has not been implemented, it is assumed the next planet is used as a parameter.

planetTravel.moveToNextPlanet(planet);

4. Return the current planet:

Return the information about the planet that the player is currently on.

planetTravel.returnCurrent();
Clone this wiki locally