<commit_before>package controller;

import boundary.PlayerApplication;
import boundary.PlayerBoardView;
import boundary.PlayerLevelView;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import model.PlayerModel;

public class PlayerRestartLevelCtrl implements ActionListener{
  PlayerApplication app;
  PlayerModel model;

  public PlayerRestartLevelCtrl(PlayerApplication app, PlayerModel model) {
    this.app = app;
    this.model = model;
  }

  public void actionPerformed(ActionEvent event) {
    model.level.discardBoard();
    model.level.realizeBoard();

    PlayerBoardView boardView = ((PlayerLevelView) app.getView()).boardView;
    boardView.repaint();
  }
}<commit_msg>Add the rest of the functionality for Restarting a Level that was mentioned previously<commit_after>package controller;

import boundary.PlayerApplication;
import boundary.PlayerBoardView;
import boundary.PlayerLevelView;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import model.PlayerModel;

public class PlayerRestartLevelCtrl implements ActionListener{
  PlayerApplication app;
  PlayerModel model;

  public PlayerRestartLevelCtrl(PlayerApplication app, PlayerModel model) {
    this.app = app;
    this.model = model;
  }

  public void actionPerformed(ActionEvent event) {
    model.level.discardBoard();
    model.level.realizeBoard();
    model.reset();

    PlayerBoardView boardView = ((PlayerLevelView) app.getView()).boardView;
    boardView.repaint();
  }
}
{'fraction_non_alphanumeric': 0.08632138114209828, 'fraction_numerical': 0.0, 'mean_word_length': 5.279166666666667, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6804447', 'n_tokens_mistral': 414, 'n_tokens_neox': 406, 'n_words': 100}