public void setPieces(){
		OthelloPiece[][] piecesToBeSaved = OthelloBoard.getPieces(); 
		
		for(int j = 0; j < piecesToBeSaved[0].length; j++){
			for(int i = 0; i < piecesToBeSaved.length; i++){
				if(piecesToBeSaved[i][j].getPieceColour() == Piece.OthelloPieceColour.BLACK){

					Element newBlackPiece;
					
					if(Game.getPlayer(0).getColour().equals("Black")){
						newBlackPiece = getDoc().createElement("piece1");
					}else{
						newBlackPiece = getDoc().createElement("piece2");
					}
					
					Element x = getDoc().createElement("x");
					x.appendChild(getDoc().createTextNode(i + ""));
					Element y = getDoc().createElement("y");
					y.appendChild(getDoc().createTextNode(j + ""));
					
					newBlackPiece.appendChild(x);
					newBlackPiece.appendChild(y);

					if(Game.getPlayer(0).getColour().equals("Black")){
						getPlayers(0).appendChild(newBlackPiece);
					}else{
						getPlayers(1).appendChild(newBlackPiece);
					}
				}else if(piecesToBeSaved[i][j].getPieceColour() == Piece.OthelloPieceColour.WHITE){

					Element newWhitePiece;
					
					if(Game.getPlayer(1).getColour().equals("Black")){
						newWhitePiece = getDoc().createElement("piece1");
					}else{
						newWhitePiece = getDoc().createElement("piece2");
					}
					
					Element x = getDoc().createElement("x");
					x.appendChild(getDoc().createTextNode(i + ""));
					Element y = getDoc().createElement("y");
					y.appendChild(getDoc().createTextNode(j + ""));
					
					newWhitePiece.appendChild(x);
					newWhitePiece.appendChild(y);
					
					if(Game.getPlayer(1).getColour().equals("Black")){
						getPlayers(0).appendChild(newWhitePiece);
					}else{
						getPlayers(1).appendChild(newWhitePiece);
					}
				}else{}
			}
		}	
	}