public GameLoader(String fileName){
    	try {
			m_fXmlFile = new File(fileName);
			DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
			DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
			
			m_doc = dBuilder.parse(m_fXmlFile);
			m_doc.getDocumentElement().normalize();
	
			m_game = m_doc.getElementsByTagName("game");
			m_player= m_doc.getElementsByTagName("player");
			m_p1Piece = m_doc.getElementsByTagName("piece1");
			m_p2Piece = m_doc.getElementsByTagName("piece2");
		
			Node game = m_game.item(0);
			
			Element element = (Element) game;

			setGametype(element);
			
			if(getGameType()){
				
				setTime(element);
				setPlayerTurn(element);
			
				for (int i = 0; i < m_player.getLength(); i++) {
				
					Node nNode = m_player.item(i);
	
					if (nNode.getNodeType() == Node.ELEMENT_NODE) {
						Element eElement = (Element) nNode;
						setPlayerData(eElement);
						setPlayerPieces(eElement);
					}
				
				}
			}else{
				System.out.println("Wrong game type.");
			}
		} catch (Exception e) {
			JOptionPane.showMessageDialog(null, "Corrupted file type.");
		}	

		if(getGameType()){
			convertToIntegers();
			drawToTerminal();
			setupBoard();
		}else{
			System.out.println("Wrong game type.");
		}
	}