<commit_before>package jsettlers.main;

import java.util.Date;

import jsettlers.common.map.MapLoadException;
import jsettlers.graphics.map.UIState;
import jsettlers.graphics.startscreen.IStartScreenConnector.ILoadableGame;
import jsettlers.logic.map.newGrid.MainGrid;
import jsettlers.logic.map.save.MapLoader;

/**
 * This is a saved game, that can be deserialized again.
 * 
 * @author michael
 */
public class SavedGame implements ILoadableGame, IGameCreator {

	private final MapLoader loader;

	public SavedGame(MapLoader loader) {
		this.loader = loader;
	}

	@Override
	public String getName() {
		try {
			return loader.getFileHeader().getName();
		} catch (MapLoadException e) {
			return "load error.";
		}
	}

	@Override
	public Date getSaveTime() {
		try {
			return loader.getFileHeader().getDate();
		} catch (MapLoadException e) {
			return new Date();
		}
	}

	@Override
	public MainGrid getMainGrid() throws MapLoadException {
		return loader.getMainGrid();
	}

	@Override
	public UIState getUISettings(int player) throws MapLoadException {
		return loader.getUISettings(player);
	}

}<commit_msg>Some TODO-list cleanup. Removed solved entries, changed some of the rest to describe the problem better.<commit_after>package jsettlers.main;

import java.util.Date;

import jsettlers.common.map.MapLoadException;
import jsettlers.graphics.map.UIState;
import jsettlers.graphics.startscreen.IStartScreenConnector.ILoadableGame;
import jsettlers.logic.map.newGrid.MainGrid;
import jsettlers.logic.map.save.MapFileHeader;
import jsettlers.logic.map.save.MapLoader;

/**
 * This is a saved game, that can be deserialized again.
 * 
 * @author michael
 */
public class SavedGame implements ILoadableGame, IGameCreator {

	private final MapLoader loader;

	public SavedGame(MapLoader loader) {
		this.loader = loader;
	}

	@Override
	public String getName() {
		try {
			return loader.getFileHeader().getName();
		} catch (MapLoadException e) {
			return "load error.";
		}
	}

	@Override
	public Date getSaveTime() {
		try {
			return loader.getFileHeader().getDate();
		} catch (MapLoadException e) {
			return new Date();
		}
	}

	@Override
	public MainGrid getMainGrid() throws MapLoadException {
		return loader.getMainGrid();
	}

	@Override
	public UIState getUISettings(int player) throws MapLoadException {
		return loader.getUISettings(player);
	}

	@Override
    public short[] getImage() {
		try {
			return loader.getFileHeader().getBgimage();
		} catch (MapLoadException e) {
			return new short[MapFileHeader.PREVIEW_IMAGE_SIZE * MapFileHeader.PREVIEW_IMAGE_SIZE];
		}
    }

}
{'fraction_non_alphanumeric': 0.10115384615384615, 'fraction_numerical': 0.0, 'mean_word_length': 4.487341772151899, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6015105', 'n_tokens_mistral': 891, 'n_tokens_neox': 820, 'n_words': 199}