class TeamAssignmentAction extends AbstractAction {

        private TeamAssignment teamAssignment;

        public TeamAssignmentAction(TeamAssignment teamAssignment) {
            super("Play");
            this.teamAssignment = teamAssignment;
        }

        @Override
        public void actionPerformed(ActionEvent e) {<FILL_FUNCTION_BODY>}

    }

            JPanel listFieldsPanel = new JPanel(new GridLayout(2, 2));
            listFieldsPanel.add(new JLabel("Team:"));
            List<Team> teamList = getSolution().getTeamList();
            // Add 1 to array size to add null, which makes the entity unassigned
            JComboBox teamListField = new JComboBox(
                    teamList.toArray(new Object[teamList.size() + 1]));
            LabeledComboBoxRenderer.applyToComboBox(teamListField);
            teamListField.setSelectedItem(teamAssignment.getTeam());
            listFieldsPanel.add(teamListField);
            listFieldsPanel.add(new JLabel("Pinned:"));
            JCheckBox pinnedField = new JCheckBox("cannot move during solving");
            pinnedField.setSelected(teamAssignment.isPinned());
            listFieldsPanel.add(pinnedField);
            int result = JOptionPane.showConfirmDialog(TennisPanel.this.getRootPane(), listFieldsPanel,
                    "Select team", JOptionPane.OK_CANCEL_OPTION);
            if (result == JOptionPane.OK_OPTION) {
                Team toTeam = (Team) teamListField.getSelectedItem();
                if (teamAssignment.getTeam() != toTeam) {
                    doProblemChange((workingSolution, problemChangeDirector) -> problemChangeDirector
                            .changeVariable(teamAssignment, "team", ta -> ta.setTeam(toTeam)));
                }
                boolean toPinned = pinnedField.isSelected();
                if (teamAssignment.isPinned() != toPinned) {
                    doProblemChange((workingSolution, problemChangeDirector) -> problemChangeDirector
                            .changeProblemProperty(teamAssignment, ta -> ta.setPinned(toPinned)));
                }
                solverAndPersistenceFrame.resetScreen();
            }
        
<methods>public non-sealed void <init>() ,public java.awt.Color determinePlanningEntityColor(java.lang.Object, java.lang.Object) ,public java.lang.String determinePlanningEntityTooltip(java.lang.Object) ,public void doProblemChange(ProblemChange<org.optaplanner.examples.tennis.domain.TennisSolution>) ,public void doProblemChange(ProblemChange<org.optaplanner.examples.tennis.domain.TennisSolution>, boolean) ,public java.awt.Dimension getPreferredScrollableViewportSize() ,public int getScrollableBlockIncrement(java.awt.Rectangle, int, int) ,public boolean getScrollableTracksViewportHeight() ,public boolean getScrollableTracksViewportWidth() ,public int getScrollableUnitIncrement(java.awt.Rectangle, int, int) ,public org.optaplanner.examples.tennis.domain.TennisSolution getSolution() ,public SolutionBusiness<org.optaplanner.examples.tennis.domain.TennisSolution,?> getSolutionBusiness() ,public SolverAndPersistenceFrame<org.optaplanner.examples.tennis.domain.TennisSolution> getSolverAndPersistenceFrame() ,public java.lang.String getUsageExplanationPath() ,public boolean isIndictmentHeatMapEnabled() ,public boolean isUseIndictmentColor() ,public boolean isWrapInScrollPane() ,public abstract void resetPanel(org.optaplanner.examples.tennis.domain.TennisSolution) ,public void setSolutionBusiness(SolutionBusiness<org.optaplanner.examples.tennis.domain.TennisSolution,?>) ,public void setSolverAndPersistenceFrame(SolverAndPersistenceFrame<org.optaplanner.examples.tennis.domain.TennisSolution>) ,public void setUseIndictmentColor(boolean) ,public void updatePanel(org.optaplanner.examples.tennis.domain.TennisSolution) <variables>protected static final java.awt.Color[][] INDICTMENT_COLORS,public static final java.awt.Dimension PREFERRED_SCROLLABLE_VIEWPORT_SIZE,protected static final java.lang.String USAGE_EXPLANATION_PATH,protected double[] indictmentMinimumLevelNumbers,protected final transient Logger logger,protected org.optaplanner.swing.impl.TangoColorFactory normalColorFactory,protected SolutionBusiness<org.optaplanner.examples.tennis.domain.TennisSolution,?> solutionBusiness,protected SolverAndPersistenceFrame<org.optaplanner.examples.tennis.domain.TennisSolution> solverAndPersistenceFrame,protected boolean useIndictmentColor