Examples of Pion


Examples of Model.Othello.Pion

         boolean partieFinie = false;
         switch(this._othelloController.get_modeJeu().get_mode()){
            case ModeJeu.TYPE_JOUER_PLUSIEURS|ModeJeu.TYPE_JOUER_SEUL:
                if(this._othelloController.get_currentPlayer().equals(this._othelloController.get_blackPlayer())){
                    //tester si le nouveau joueur Rouge peut jouer
                    if( this._othelloController.get_gridOthello().IsCoupPossible( new Pion(new Couleur(Couleur.RED))) ){
                        this._othelloController.set_currentPlayer(this._othelloController.get_redPlayer());
                    }else if(this._othelloController.get_gridOthello().IsCoupPossible( new Pion(new Couleur(Couleur.BLACK)))){
                        //si le joueur noir peut jouer, c'est à son tour
                        this._othelloController.set_currentPlayer(this._othelloController.get_blackPlayer());
                    }else{
                        //aucun joueur ne peut jouer
                        partieFinie = true;
                    }                   
                }else{
                    //tester si le nouveau joueur Noir peut jouer
                    if( this._othelloController.get_gridOthello().IsCoupPossible( new Pion(new Couleur(Couleur.BLACK))) ){
                        this._othelloController.set_currentPlayer(this._othelloController.get_blackPlayer());
                    }else if(this._othelloController.get_gridOthello().IsCoupPossible( new Pion(new Couleur(Couleur.RED)))){
                        //si le joueur noir peut jouer, c'est à son tour
                        this._othelloController.set_currentPlayer(this._othelloController.get_redPlayer());
                    }else{
                        //aucun joueur ne peut jouer
                        partieFinie = true;
View Full Code Here

Examples of Model.Othello.Pion

                if(this._othelloController.get_currentPlayer().equals(this._othelloController.get_blackPlayer())){
                    couleurPion = Couleur.BLACK;
                }else if(this._othelloController.get_currentPlayer().equals(this._othelloController.get_redPlayer())){
                    couleurPion = Couleur.RED;
                }
                this._othelloController.get_gridOthello().setCell(row, col, new Pion(new Couleur(couleurPion)));
                break;
        }
        _othelloController.get_gridOthello().setCursorPos(row, col);
    }
View Full Code Here

Examples of echiquier.pieces.Pion

    historique.clear();

    plateau = new HashMap<Position, Piece>();

    for (int i = 0; i < 8; ++i) {
      plateau.put(new Position(i, 1), new Pion(Couleur.BLANC));
      plateau.put(new Position(i, 6), new Pion(Couleur.NOIR));
    }

    plateau.put(new Position(0, 0), new Tour(Couleur.BLANC));
    plateau.put(new Position(7, 0), new Tour(Couleur.BLANC));
    plateau.put(new Position(0, 7), new Tour(Couleur.NOIR));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.