feat: add proper game initialization
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
package uulm.teamname.marvelous.gamelibrary.gamelogic;
|
||||
|
||||
import uulm.teamname.marvelous.gamelibrary.IntVector2;
|
||||
import uulm.teamname.marvelous.gamelibrary.events.Event;
|
||||
import uulm.teamname.marvelous.gamelibrary.events.EventType;
|
||||
import uulm.teamname.marvelous.gamelibrary.json.config.CharacterConfig;
|
||||
@ -8,6 +7,7 @@ import uulm.teamname.marvelous.gamelibrary.json.config.PartyConfig;
|
||||
import uulm.teamname.marvelous.gamelibrary.json.config.ScenarioConfig;
|
||||
import uulm.teamname.marvelous.gamelibrary.requests.Request;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Observer;
|
||||
|
||||
/** Represents a game instance. */
|
||||
@ -60,9 +60,12 @@ public class GameInstance {
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes and starts the game.
|
||||
* Initializes and starts the game. Selected characters are given as a list of indices from the {@link CharacterConfig#characters} array.
|
||||
* @param selectedCharacters1 The characters selected by player 1
|
||||
* @param selectedCharacters2 The characters selected by player 2
|
||||
*/
|
||||
public void startGame() {
|
||||
public void startGame(ArrayList<Integer> selectedCharacters1, ArrayList<Integer> selectedCharacters2) {
|
||||
emit(manager.initGame(selectedCharacters1, selectedCharacters2));
|
||||
emit(manager.startGame());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user