Class ReplayGenerator

java.lang.Object
com.mg105.use_cases.ReplayGenerator

public class ReplayGenerator extends Object
A class that implement the game restart and replay function. this class have players' attribute inheritance method and players' inventory clean method.
  • Constructor Details

    • ReplayGenerator

      public ReplayGenerator(@NotNull @NotNull GameState state, @NotNull @NotNull Resetable... resetables)
      Create a new ReplayGenerator
      Parameters:
      state - the game state.
      resetables - resetable things.
  • Method Details

    • reviveCharacters

      public void reviveCharacters()
      Revive all characters and add them to the list of alive characters
    • replay

      public void replay()
      Replay the game by interacting with the MapGenerator class