public void setPieces(){
		ConnectFourPiece[][] piecesToBeSaved = ConnectFourBoard.getPieces(); 
		
		for(int j = 0; j < piecesToBeSaved[0].length; j++){
			for(int i = 0; i < piecesToBeSaved.length; i++){
				if(piecesToBeSaved[i][j].getPieceColour() == Piece.ConnectFourPieceColour.RED){
					Element newRedPiece;
					
					if(Game.getPlayer(0).getColour() == Piece.ConnectFourPieceColour.RED){
						newRedPiece = getDoc().createElement("piece1");
					}else{	
						newRedPiece = getDoc().createElement("piece2");
					}
					
					Element x = getDoc().createElement("x");
					x.appendChild(getDoc().createTextNode(i + ""));
					Element y = getDoc().createElement("y");
					y.appendChild(getDoc().createTextNode(j + ""));
					
					newRedPiece.appendChild(x);
					newRedPiece.appendChild(y);
					
					if(Game.getPlayer(0).getColour() == Piece.ConnectFourPieceColour.RED){
						getPlayers(0).appendChild(newRedPiece);
					}else{	
						getPlayers(1).appendChild(newRedPiece);
					}
				}else if(piecesToBeSaved[i][j].getPieceColour() == 
														Piece.ConnectFourPieceColour.YELLOW){
					Element newYellowPiece;
					
					if(Game.getPlayer(1).getColour() == Piece.ConnectFourPieceColour.RED){
						newYellowPiece = getDoc().createElement("piece1");
					}else{	
						newYellowPiece = getDoc().createElement("piece2");
					}
					
					
					Element x = getDoc().createElement("x");
					x.appendChild(getDoc().createTextNode(i + ""));
					Element y = getDoc().createElement("y");
					y.appendChild(getDoc().createTextNode(j + ""));
					
					newYellowPiece.appendChild(x);
					newYellowPiece.appendChild(y);

					if(Game.getPlayer(1).getColour() == Piece.ConnectFourPieceColour.RED){
						getPlayers(0).appendChild(newYellowPiece);
					}else{	
						getPlayers(1).appendChild(newYellowPiece);
					}
				}else{}
			}
		}	
	}