<commit_before>package userinterface;

import java.io.InputStream;
import java.io.PrintStream;

import minesweeper.Location;

public class TUIView {

	private TUIHelper ui;
	
	public TUIView(InputStream in, PrintStream out){
		
		ui=new TUIHelper(in, out);
	}
	
	public void displayWelcome() {
		
		ui.printFullLine('*');
		ui.wrappedPrint('|',"");
		ui.wrappedPrint('|', "Welcome to Minesweeper for Command Line!");
		ui.wrappedPrint('|', "By");
		ui.wrappedPrint('|', "<NAME>");
		ui.wrappedPrint('|', "");
		ui.printFullLine('*');
	}
	
	public void displayGoodbye() {
		ui.printFullLine('*');
		ui.wrappedPrint('*', "");
		ui.wrappedPrint('*', "Thanks");
		ui.wrappedPrint('*', "for playing");
		ui.wrappedPrint('*', "Minesweeper for Command Line!");
		ui.wrappedPrint('*', "");
		ui.printFullLine('*');
	}
	
	public String playAgain() {
		ui.centerPrint("Play again?");
		return ui.inputPrompt("(y,n): ");
	}

	public int getX(int maxsize) {
		// TODO Auto-generated method stub
		return ui.nextBountedInt("How wide?", 1,maxsize);
	}
	
	public int getY(int maxsize){
		return ui.nextBountedInt("How tall?", 1,maxsize);
	}
	
	public int getMines(int maxsize){
		return ui.nextBountedInt("How Many Mines?", 1,maxsize);
	}

	public void print(StringBuilder grid) {

		ui.print(grid);
		
	}

	public void displayLoseGameOver() {
		// TODO Auto-generated method stub
		
	}

	public void displayWinGameOver() {
		// TODO Auto-generated method stub
		
	}

	public String nextCommand() {

		ui.centerPrint("what would you like to do?");
		ui.centerPrint("1) Click a Spot");
		ui.centerPrint("2) Flag a Spot");
		ui.centerPrint("3) Quit the Game");
		
		return ui.inputPrompt("Your move: ");<commit_msg>add end of game text<commit_after>package userinterface;

import java.io.InputStream;
import java.io.PrintStream;

import minesweeper.Location;

public class TUIView {

	private TUIHelper ui;
	
	public TUIView(InputStream in, PrintStream out){
		
		ui=new TUIHelper(in, out);
	}
	
	public void displayWelcome() {
		
		ui.printFullLine('*');
		ui.wrappedPrint('|',"");
		ui.wrappedPrint('|', "Welcome to Minesweeper for Command Line!");
		ui.wrappedPrint('|', "By");
		ui.wrappedPrint('|', "<NAME>");
		ui.wrappedPrint('|', "");
		ui.printFullLine('*');
	}
	
	public void displayGoodbye() {
		ui.printFullLine('*');
		ui.wrappedPrint('*', "");
		ui.wrappedPrint('*', "Thanks");
		ui.wrappedPrint('*', "for playing");
		ui.wrappedPrint('*', "Minesweeper for Command Line!");
		ui.wrappedPrint('*', "");
		ui.printFullLine('*');
	}
	
	public String playAgain() {
		ui.centerPrint("Play again?");
		return ui.inputPrompt("(y,n): ");
	}

	public int getX(int maxsize) {
		// TODO Auto-generated method stub
		return ui.nextBountedInt("How wide?", 1,maxsize);
	}
	
	public int getY(int maxsize){
		return ui.nextBountedInt("How tall?", 1,maxsize);
	}
	
	public int getMines(int maxsize){
		return ui.nextBountedInt("How Many Mines?", 1,maxsize);
	}

	public void print(StringBuilder grid) {

		ui.print(grid);
		
	}

	public void displayLoseGameOver() {

		ui.centerPrint("BOOM! YOU LOSE!");
		
	}

	public void displayWinGameOver() {

		ui.centerPrint("Phew! that was too close, Congrats!");
	}

	public String nextCommand() {

		ui.centerPrint("what would you like to do?");
		ui.centerPrint("1) Click a Spot");
		ui.centerPrint("2) Flag a Spot");
		ui.centerPrint("3) Quit the Game");
		
		return ui.inputPrompt("Your move: ");
{'fraction_non_alphanumeric': 0.17095265926358855, 'fraction_numerical': 0.0035067212156633548, 'mean_word_length': 4.32348367029549, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5262259', 'n_tokens_mistral': 1329, 'n_tokens_neox': 1188, 'n_words': 277}