public synchronized static String deleteGame(String ip) {
		String msg = "DELETE_GAME FAILURE";

		boolean flag = true;
		// get node
		Element g = getGameElement(ip);
		if (g != null) {
			// move players
			NodeList players = getPlayersFromGame(g);
			for (int i = 0; i < players.getLength(); i++) {
				Element myEl = (Element) players.item(i);
				String uIP = myEl.getElementsByTagName("ip_address").item(0)
						.getTextContent();
				if (leaveGame(uIP).contains("FAIL")) {
					flag = false;
				}
			}

			// remove game
			g.getParentNode().removeChild(g);
			if (flag && writeToXML())
				msg = "DELETE_GAME SUCCESS";
		}
		return msg;
	}