Examples of GalacticController


Examples of com.barrybecker4.game.multiplayer.galactic.GalacticController

     * The Orders button was pressed.
     * open the Orders dialog to get the players commands
     */
    @Override
    public void actionPerformed(ActionEvent e) {
        GalacticController gc = (GalacticController)controller_;
        gameChanged(null); // update the current player in the label

        if (e.getSource() == commandButton_) {

            // if the current player does not own any planets, then advance to the next player
            if (Galaxy.getPlanets((GalacticPlayer) gc.getCurrentPlayer()).size() == 0)  {
                gc.advanceToNextPlayer();
            }

            showOrdersDialog(gc);
        }
        else if (e.getSource() == passButton_) {
           gc.advanceToNextPlayer();
        }
    }
View Full Code Here

Examples of com.barrybecker4.game.multiplayer.galactic.GalacticController

    /** Construct the application   */
    public GalaxyViewer() {}

    @Override
    protected MultiGameController createController() {
        return new GalacticController();
    }
View Full Code Here

Examples of com.barrybecker4.game.multiplayer.galactic.GalacticController

     */
    @Override
    public boolean doComputerMove(Player player) {
        assert(!player.isHuman());
        GalacticRobotPlayer robot = (GalacticRobotPlayer)player;
        GalacticController gc = (GalacticController) controller_;
        GameContext.log(1, "now doing computer move. about to make orders");

        robot.makeOrders((Galaxy)getBoard(), gc.getNumberOfYearsRemaining());

        /* // records the result on the board.
        Move lastMove = getController().getLastMove();
        GalacticTurn gmove = GalacticTurn.createMove((lastMove==null)? 0 : lastMove.moveNumber + 1);
        gc.makeMove(gmove);
        */
        this.refresh();

        gc.advanceToNextPlayer();
        return false;
    }
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.