<commit_before>/**
 * 
 */
package ge.edu.freeuni.sdp.snake.view.swing;

import ge.edu.freeuni.sdp.snake.presenter.GameOverPresenter;
import ge.edu.freeuni.sdp.snake.presenter.HighScorePresenter;
import ge.edu.freeuni.sdp.snake.presenter.LevelPresenter;
import ge.edu.freeuni.sdp.snake.presenter.MazePresenter;
import ge.edu.freeuni.sdp.snake.view.GameOverView;
import ge.edu.freeuni.sdp.snake.view.HighScoreView;
import ge.edu.freeuni.sdp.snake.view.LevelView;
import ge.edu.freeuni.sdp.snake.view.MazeView;
import ge.edu.freeuni.sdp.snake.view.ViewFactory;
import javax.swing.JFrame;

/**
 * @author Giorgi
 *
 */
public class SwingViewFactory implements ViewFactory {
	private JFrame frame;

	/**
	 * Constructor for different Swing views
	 * 
	 * @param frame
	 *            on which will be painted elements
	 * @param screen
	 */
	public SwingViewFactory(JFrame frame) {
		this.frame = frame;
		
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * ge.edu.freeuni.sdp.snake.view.ViewFactory#getLevelView(ge.edu.freeuni
	 * .sdp.snake.presenter.LevelPresenter)
	 */
	@Override
	public LevelView getLevelView(LevelPresenter presenter) {
		return new SwingLevelView(presenter, frame);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * ge.edu.freeuni.sdp.snake.view.ViewFactory#getMazeView(ge.edu.freeuni.
	 * sdp.snake.presenter.MazePresenter)
	 */
	@Override
	public MazeView getMazeView(MazePresenter presenter) {
		return new SwingMazeView(presenter, frame);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * ge.edu.freeuni.sdp.snake.view.ViewFactory#getGameOverView(ge.edu.freeuni
	 * .sdp.snake.presenter.GameOverPresenter)
	 */
	@Override
	public GameOverView getGameOverView(GameOverPresenter presenter) {
		return new SwingGameOverView();
	}

	@Override
	public HighScoreView getHighScoreView(HighScorePresenter presenter) {
		
		return null;
	}

}<commit_msg>Fixed null ref exception in ViewController because of missing HighScoreView.<commit_after>/**
 * 
 */
package ge.edu.freeuni.sdp.snake.view.swing;

import ge.edu.freeuni.sdp.snake.presenter.GameOverPresenter;
import ge.edu.freeuni.sdp.snake.presenter.HighScorePresenter;
import ge.edu.freeuni.sdp.snake.presenter.LevelPresenter;
import ge.edu.freeuni.sdp.snake.presenter.MazePresenter;
import ge.edu.freeuni.sdp.snake.view.GameOverView;
import ge.edu.freeuni.sdp.snake.view.HighScoreView;
import ge.edu.freeuni.sdp.snake.view.LevelView;
import ge.edu.freeuni.sdp.snake.view.MazeView;
import ge.edu.freeuni.sdp.snake.view.ViewFactory;
import javax.swing.JFrame;

/**
 * @author Giorgi
 *
 */
public class SwingViewFactory implements ViewFactory {
	private JFrame frame;

	/**
	 * Constructor for different Swing views
	 * 
	 * @param frame
	 *            on which will be painted elements
	 * @param screen
	 */
	public SwingViewFactory(JFrame frame) {
		this.frame = frame;
		
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * ge.edu.freeuni.sdp.snake.view.ViewFactory#getLevelView(ge.edu.freeuni
	 * .sdp.snake.presenter.LevelPresenter)
	 */
	@Override
	public LevelView getLevelView(LevelPresenter presenter) {
		return new SwingLevelView(presenter, frame);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * ge.edu.freeuni.sdp.snake.view.ViewFactory#getMazeView(ge.edu.freeuni.
	 * sdp.snake.presenter.MazePresenter)
	 */
	@Override
	public MazeView getMazeView(MazePresenter presenter) {
		return new SwingMazeView(presenter, frame);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * ge.edu.freeuni.sdp.snake.view.ViewFactory#getGameOverView(ge.edu.freeuni
	 * .sdp.snake.presenter.GameOverPresenter)
	 */
	@Override
	public GameOverView getGameOverView(GameOverPresenter presenter) {
		return new SwingGameOverView();
	}

	@Override
	public HighScoreView getHighScoreView(HighScorePresenter presenter) {
		return new SwingHighScoreView();
	}

}
{'fraction_non_alphanumeric': 0.12142857142857143, 'fraction_numerical': 0.0, 'mean_word_length': 4.048064085447263, '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': '138913', 'n_tokens_mistral': 1465, 'n_tokens_neox': 1372, 'n_words': 206}