@Override
	public void saveGame(int id, String name) throws IOException{
		XStream xstream = new XStream();
		ServerModel game = gameModelsList.get(id);
		String xml = xstream.toXML(game);
		File file = new File("saves/");
		if (!file.exists()) {
			if (file.mkdir()) {
				System.out.println("Directory is created!");
			} else {
				System.out.println("Failed to create directory!");
			}
		}
		BufferedWriter writer = new BufferedWriter( new FileWriter("saves/" + name + ".xml"));
	    writer.write(xml);
	    writer.close();
	}