public void setPieces(){
		TicTacToePiece[][] piecesToBeSaved = TicTacToeBoard.getBoard(); 
		
		for(int j = 0; j < piecesToBeSaved[0].length; j++){
			for(int i = 0; i < piecesToBeSaved.length; i++){
				if(piecesToBeSaved[i][j].getPieceColour() == Piece.TicTacToePieceColour.NOUGHT){

					Element newNoughtPiece;
					
					System.out.println(Game.getPlayer(0).getColour());
					
					if(Game.getPlayer(0).getColour().equals(Piece.TicTacToePieceColour.NOUGHT)){
						newNoughtPiece = getDoc().createElement("piece1");
					}else{
						newNoughtPiece = getDoc().createElement("piece2");
					}
					
					Element x = getDoc().createElement("x");
					x.appendChild(getDoc().createTextNode(i + ""));
					Element y = getDoc().createElement("y");
					y.appendChild(getDoc().createTextNode(j + ""));
					
					newNoughtPiece.appendChild(x);
					newNoughtPiece.appendChild(y);

					if(Game.getPlayer(0).getColour().equals(Piece.TicTacToePieceColour.NOUGHT)){
						getPlayers(0).appendChild(newNoughtPiece);
					}else{
						getPlayers(1).appendChild(newNoughtPiece);
					}
				}else if(piecesToBeSaved[i][j].getPieceColour() == Piece.TicTacToePieceColour.CROSS){

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