private void renderPieces()
	{
		int sq = 0;
		for (int y = 0; y < RANK_N; y++)
    		for (int x = 0; x < FILE_N; x++)
    		{
    			// First clear all old models
    			Piece piece = null;
    			if ((piece = boardManager.getModel(sq)) != null)
    				rootNode.detachChild(piece);
    					
				int p = boardManager.getPiece(sq);
				
				if (p != NON)
				{
					piece = new Piece(
							(Geometry) assetManager.loadModel("Models/" + Piece.name(p) + this.modelId + ".j3o"),
							p,  // specify the piece type
							boardManager.isWhite(sq) ? this.lightPieceMat : this.darkPieceMat,
							boardManager.getSide(sq), x, y);
					rootNode.attachChild(piece);
				}
				boardManager.setModel(sq++, piece);
    		}
	}