Package randomevents.discreteEvents

Examples of randomevents.discreteEvents.Archer


            int goodArcherCount = Integer.parseInt(goodArcherCountField.getText());
            int mediocreArcherCount = Integer.parseInt(mediocreArcherCountField.getText());
            int badArcherCount = Integer.parseInt(badArcherCountField.getText());
            int archerCount = excellentArcherCount + goodArcherCount + mediocreArcherCount + badArcherCount;

            archers[0] = new Archer("Отличный",
                    Double.parseDouble(excellentArcherHitPField.getText()),
                    (double) excellentArcherCount / (double) archerCount, excellentArcherCount);
            archers[1] = new Archer("Хороший",
                    Double.parseDouble(goodArcherHitPField.getText()),
                    archers[0].getPChoosen() + (double) goodArcherCount / (double) archerCount, goodArcherCount);
            archers[2] = new Archer("Посредственный",
                    Double.parseDouble(mediocreArcherHitPField.getText()),
                    archers[1].getPChoosen() + (double) mediocreArcherCount / (double) archerCount, mediocreArcherCount);
            archers[3] = new Archer("Плохой",
                    Double.parseDouble(badArcherHitPField.getText()),
                    archers[2].getPChoosen() + (double) badArcherCount / (double) archerCount, badArcherCount);

            excellentArcherChoosenLabel.setText(String.format("%d...%4.2f", 0, archers[0].getPChoosen()));
            goodArcherChoosenLabel.setText(String.format("%4.2f...%4.2f", archers[0].getPChoosen(), archers[1].getPChoosen()));
View Full Code Here

TOP

Related Classes of randomevents.discreteEvents.Archer

Copyright © 2018 www.massapicom. 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.