#include "text.h"
#include <fstream>
#include <iostream>



using namespace std;

int text::getRules()
{

	cout << "Dice Roller!" << endl;

	int remove;
	cout << "do you want to delete the recorded files data?" << endl << "if yes then type 1 if no type 0" << endl << endl;
	cin >> remove;

	if (remove == 1);
	{
		ofstream myfile;
		myfile.open("score.txt", ios::out);
		myfile.close();
	}


	cout << "Hello there welcome to my program: " << endl << "here you will randomly get give numbers and get the closest to the number 18!" << endl;

	cout << "Firstly start by figuring out who will go first!" << endl << endl << "Your first?     OK!" << endl << endl;
    return 0;
}

int text::winner()
{

	int one;
	cout << "who has the closet number to 18?" << endl << endl << "please type 1 or 2 ?" << endl;
	cin >> one;

	if (one == 1)
	{
		cout << "congratulations player 1!" << endl;

	}
	else if (one == 2)
	{
		cout << "congratulations player2!" << endl;
	}
	else
	{
		cout << "awww nobody one!" << endl << "to see your score goto the text file located in the same folder as this program" << endl;
		return 0;

	}
	cout << "You won the game!" << endl << endl << "to see your score goto the text file located in the same folder as this program ";

	return 0;
	
}
