Package monopoly.model.gamefield

Examples of monopoly.model.gamefield.CompanyCell.owner()


            GameViewEvent event = new GameViewEvent(this, p, penalty);
            fireMadePlayerPenalty(event);
        } else if (cell instanceof CompanyCell) {
            final CompanyCell companyCell = (CompanyCell) cell;

            if (companyCell.owner() == _gameModel.bank()) {
                _canPlayerBuyLand = true;

                final Dialog dialog = new JDialog();
                dialog.setModal(true);
                dialog.setTitle("Фирма \"" + companyCell.name() + "\"");
View Full Code Here


                            + "средств для покупки фирмы <u>\"" + companyCell.name()
                            + "\"</u>.<br>Необходмо: <i>" + companyCell.cost()
                            + "$.</i><br>Имеется: <i>" + p.money() + "$.</i>"
                            + "</html>");
                }
            } else if (companyCell.owner() != p) {
                final Dialog infoDialog = new JDialog();
                infoDialog.setModal(true);
                infoDialog.setTitle("Фирма \"" + companyCell.name() + "\"");
                infoDialog.setLayout(new GridBagLayout());
                GridBagConstraints c = new GridBagConstraints();
View Full Code Here

                c.gridx = 0;
                c.gridy = 0;

                Color color = HTMLColors.black;
                final ILandOwner owner = companyCell.owner();
                if (owner instanceof Player) {
                    color = ((Player) owner).color();
                }

                infoDialog.add(new JLabel("<html>"
View Full Code Here

                + company.rent() + " $</i>"
                + "</html>"), c);

        c.gridy = 4;
        Color color = HTMLColors.black;
        ILandOwner owner = company.owner();
        if (owner instanceof Player) {
            color = ((Player) owner).color();
        }

        infoDialog.add(new JLabel("<html>"
View Full Code Here

        }

        infoDialog.add(new JLabel("<html>"
                + "Владелец: <font color="
                + HTMLColors.getName(color) + ">"
                + company.owner().name() + "</font>"
                + "</html>"), c);

        JButton bttn = new JButton("OK");
        bttn.setAlignmentX(JComponent.CENTER_ALIGNMENT);
        bttn.addActionListener(new ActionListener() {
View Full Code Here

        x = 0;
        y = CELL_HEIGHT - CELL_HEIGHT / 5;

        g.drawRect(x, y, CELL_WIDTH, CELL_HEIGHT - y);

        ILandOwner owner = company.owner();
        if (owner instanceof Player) {
            Player p = (Player) owner;

            Graphics2D g2d = (Graphics2D) g;
            GradientPaint gp = new GradientPaint(x, y, Color.WHITE,
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.