jeu - #include <iomanip> #include...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: #include <iomanip> #include "minimax.h" //------------------------------------------------------------- // Entree : - // Sortie // Effet de bord : Message d'accueil //------------------------------------------------------------- void accueil() { cout << endl << endl << endl; cout << " *****************************"<<endl; cout << " BIENVENUE AU JEU DU MORPION " <<endl; cout << " *****************************"<<endl <<endl; } //------------------------------------------------------------- // Entree : - // Sortie // Effet de bord : Règles du jeu //------------------------------------------------------------- void tutorial() { cout << " __________________________________________________________________ "<< endl; cout << "| |"<< endl; cout << "|Le jeu du Morpion se joue a 2 joueurs (X et O) sur une grille 3*3.|"<< endl; cout << "|Les joueurs jouent chacun leur tour, l'objectif de X (resp. O) est|"<< endl; cout << "|d'aligner trois X (resp. O) horizontalement, verticalement, ou en |"<< endl; cout << "|diagonale. Pour jouer un coup,un joueur humain doit d'abord entrer|"<< endl; cout << "|le numero de la case où il desire jouer. Les cases sont numerotees|"<< endl; cout << "|de 1 a 9 au regard du pavé numérique à droite de votre clavier : |"<< endl; cout << "|(Désolé pour ceux qui ont un portable ;) |"<< endl; cout << "| |"<< endl; cout << "| | | |"<< endl; cout << "| 7 | 8 | 9 |"<< endl; cout << "| _____|_____|_____ |"<< endl; cout << "| | | |"<< endl; cout << "| 4 | 5 | 6 Tentez votre chance ! |"<< endl; cout << "| _____|_____|_____ |"<< endl; cout << "| | | |"<< endl; cout << "| 1 | 2 | 3 |"<< endl; cout << "| | | |"<< endl; cout << "|__________________________________________________________________|"<< endl; cout << endl; } //------------------------------------------------------------- // Entree : - // Sortie : Le joueur qui commence //------------------------------------------------------------- int debut() { int d; do { cout <<" ******************************************"<< endl; cout <<" * Qui commence ? *"<< endl; cout <<" ******************************************"<< endl; cout <<" * Humain..........................* 1 *"<< endl; cout <<" * Ordinateur......................* 2 *"<< endl; cout <<" ******************************************"<< endl; cout <<" Votre choix > "; cin >> d; cout << endl << endl; } while (d<1 || d>2); return d; } //------------------------------------------------------------- // Entree : - // Sortie : Le niveau de difficulte //------------------------------------------------------------- int niveau() { int n; do { cout <<" ******************************************"<< endl; cout <<" * Difficulté ? *"<< endl; cout <<" ******************************************"<< endl; cout <<" * Facile..........................* 1 *"<< endl; cout <<" * Moyen...........................* 2 *"<< endl; cout <<" * Difficile.......................* 3 *"<< endl; cout <<" ******************************************"<< endl; cout <<" Votre choix > "; cin >> n; cout << endl << endl; } while (n<1 || n>3); return n; } //-------------------------------------------------------------...
View Full Document

This note was uploaded on 11/01/2009 for the course AV 244 taught by Professor Dub during the Spring '09 term at ECE.

Page1 / 15

jeu - #include <iomanip> #include...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online