a simple Java-FX Application which Simulate the Approximation of Pi
https://nextn.xyz
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- package montecarlopi;
-
- public class Controller {
- private Model m = null;
- private View v = null;
-
- public Controller() {
- m = new Model();
- v = new View(this);
-
- m.addObserver(v);
- }
-
- public Model getModel() {
- return m;
- }
-
- public View getView() {
- return v;
- }
-
- public void addOne() {
- m.setExit(false);
- m.generatePoint();
- }
-
- public void addThousand() {
- m.setExit(false);
- for(int i = 0; i < 1000; i++) {
- m.generatePoint();
- }
- }
-
-
- }
|