home *** CD-ROM | disk | FTP | other *** search
/ Freelog 17 / Freelog017.iso / BeOS / ababelone / Sources / DeplacementOrdinateur.h < prev    next >
C/C++ Source or Header  |  2000-11-05  |  2KB  |  51 lines

  1. /*
  2.     Copyright (C) 2000 by Herv├⌐ PHILIPPE <rv@bemail.org>
  3.  
  4.     This library is free software; you can redistribute it and/or
  5.     modify it under the terms of the GNU Library General Public
  6.     License as published by the Free Software Foundation; either
  7.     version 2 of the License, or (at your option) any later version.
  8.  
  9.     This library is distributed in the hope that it will be useful,
  10.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  12.     Library General Public License for more details.
  13.  
  14.     You should have received a copy of the GNU Library General Public
  15.     License along with this library; if not, write to the Free
  16.     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17. */
  18.  
  19. #ifndef _DEPLACEMENTORDINATEUR_H_
  20. #define _DEPLACEMENTORDINATEUR_H_
  21.  
  22. #include "Deplacement.h"
  23.  
  24. #define COUP_IMPOSSIBLE        -32000
  25.  
  26. class DeplacementOrdinateur : public Deplacement
  27. {
  28. // FONCTIONS
  29.     public:
  30.                 DeplacementOrdinateur(PlateauDeJeuInterne* plateau_de_jeu_interne, PlateauDeJeuGraphique* plateau_de_jeu_graphique, int8 couleur, uint8 profondeur_max = 1);
  31.         void    Jouer(bool faire_glisser_les_boules = true);
  32.     private:
  33.         int16    CalculerMeilleurCoupPossible(uint8 prodondeur = 1);
  34.         void    CalculerCoup(int16& meilleur_coup, PlateauDeJeuInterne* ancien_plateau_interne, PlateauDeJeuInterne* nouveau_plateau_interne, uint8 profondeur, int8 nombre_boules_joueur = 0, int8 nombre_boules_adversaire = 0);
  35.         int16    CalculerValeurCoupPoussee(int8 nombre_boules_joueur, int8 nombre_boules_adversaire, bool deplacement_virtuel = false);
  36.         int16    CalculerValeurCoupLateral(bool deplacement_virtuel = false);
  37.         void    SauvegarderMeilleurCoup();
  38.         void    RestaurerMeilleurCoup();
  39.  
  40. // VARIABLES ET CONSTANTES
  41.     private:
  42. static    int16    m_TableauPonderation[TAILLE_TABLEAU_INTERNE][TAILLE_TABLEAU_INTERNE];
  43.         uint8    m_ProfondeurMax;
  44.  
  45.         int8    m_PremiereBouleSelectionnee_MeilleurCoup;
  46.         int8    m_Direction_MeilleurCoup;
  47.         int8    m_NombreBoulesSelectionnees_MeilleurCoup;
  48.         int8    m_DirectionLaterale_MeilleurCoup;
  49. };
  50.  
  51. #endif