Class DefaultMapReader<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>,​R extends Archetype<G,​A,​R>>

    • Constructor Detail

      • DefaultMapReader

        public DefaultMapReader​(@NotNull
                                @NotNull MapArchObjectParserFactory<A> mapArchObjectParserFactory,
                                @NotNull
                                @NotNull MapArchObjectFactory<A> mapArchObjectFactory,
                                @NotNull
                                @NotNull GameObjectParser<G,​A,​R> gameObjectParser,
                                @NotNull
                                @NotNull java.io.File file)
                         throws java.io.IOException
        Open a file for reading it as a map.
        Parameters:
        mapArchObjectParserFactory - the map arch object parser factory instance
        mapArchObjectFactory - the map arch object factory instance
        gameObjectParser - the game object parser instance
        file - the file to open
        Throws:
        java.io.IOException - in case the file couldn't be read
        InvalidMapFormatException - in case the file is in wrong format
    • Method Detail

      • getMapArchObject

        @NotNull
        public A getMapArchObject()
        Description copied from interface: MapReader
        Returns the MapArchObject read from this MapFileDecode.
        Specified by:
        getMapArchObject in interface MapReader<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>>
        Returns:
        the map arch object read from this map file decode
      • getGameObjects

        @NotNull
        public @NotNull java.util.List<G> getGameObjects()
        Description copied from interface: MapReader
        Return the decoded game objects.
        Specified by:
        getGameObjects in interface MapReader<G extends GameObject<G,​A,​R>,​A extends MapArchObject<A>>
        Returns:
        the decoded game objects