GithubHelp home page GithubHelp logo

puissance5's Introduction

Projet Puissance 5

Les classes et le diagramme de classes

Classe Jeu

Attributs :

  • plateau : Plateau
  • joueurs : vector
  • joueurCourant : size_t
  • modeIA : bool

Méthodes :

  • Jeu(size_t nbJoueurs, int nbLignes, int nbColonnes, bool modeIA = false)
  • jouerCoup(int colonne) : bool
  • getPlateau() : Plateau&
  • getJoueurCourant() const : const Joueur&
  • estIAEnCours() const : bool
  • choisirCoupIA() const : int
  • passerAuJoueurSuivant() : void

Classe Plateau

Attributs :

  • grille : vector<vector>
  • nbLignes : int
  • nbColonnes : int

Méthodes :

  • Plateau(int nbLignes, int nbColonnes)
  • placerPion(int colonne, const Joueur& joueur) : bool
  • estPleine() : bool
  • estValideCoup(int colonne) : bool
  • verifierAlignement(const Joueur& joueur) : bool
  • afficherPlateau() : void
  • getNbColonnes() : int

Classe Joueur

Attributs :

  • nom : string
  • couleur : char

Méthodes :

  • Joueur(const string& nom, char couleur)
  • getNom() : string
  • getCouleur() : char

Diagramme de classes

image

Lancer le jeu "Puissance 5"

Pour démarrer le jeu, compilez et exécutez le fichier principal = > main.cpp

Vous serez invité à entrer le nombre de lignes et de colonnes pour la grille, ainsi que le mode de jeu (1 pour 1vsIA ou 0 pour 1vs1).

puissance5's People

Contributors

edenbd1 avatar ayabelarbi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.