#include <iostream>
#include <string>

#define newline '\n'

using namespace std;

const char * welcomeF = "Good morning professor Falken\nMind to play a GaME?\n\n";
const char * gamelist = "1. chess\n2 .tictacto\n3. othello\n4. Global Thermonuclear War\n\n";
const char * chess = "All your move have been predicted from the record of the late games and I conclude that you will definitely loose\n";
const char * tictacto = "The only way to not loose on that game is \"not to play\" \n\n";
const char * othello = "I predicted all your move and i predict you gonna loose in 67 moves\n\n";
const char * nuke = "My missiles are aimed at Sherbrooke, you'd better run\n\n";
const char * no = "please choose a game listed \n\n";

void wargame()
{
	int choice;				//choix du jeux
	std::string reponse;	//reponse a une question

	std::cout << welcomeF;
	std::getline(std::cin,reponse);
	if ((reponse == "yes")||
		(reponse == "y")||
		(reponse == "Y")||
		(reponse == "Yes")||
		(reponse == "YES"))
	{
	std::cout << gamelist;

	std::cin >> choice;

	switch (choice)
	{
	case 1:
		std::cout << chess;
		break;
	case 2:
		std::cout << tictacto;
		break;
	case 3:
		std::cout << othello;
		break;
	case 4:
		std::cout << nuke;
		break;
	default:
		std::cout << no;
	}
}
}

int main()
{
	string nom;			//nom à saisir
	string tache;		//tache à saisir

	cout << "login\n";
	getline(cin, nom);
	if (nom == "joshua")
	{
		wargame();
	}
	else
	{
		cout << endl << "Hi! " << Nom << " how can I help you" << endl;
		getline(cin,tache);
		cout << endl << "You lazy ! Cant you do it by yourself ?" << endl;
	}

	cout << "\nend of transmission\n";
	cin.clear();
	cin.sync();
	cin.get();
	return 0;
}
