From 67c20af83c6d5a655997dac93cb48d6be5d7570c Mon Sep 17 00:00:00 2001 From: pp Date: Thu, 14 Oct 2021 13:30:42 +0200 Subject: [PATCH] =?UTF-8?q?A=20Rud=20oszt=C3=A1ly=20hozz=C3=A1ad=C3=A1sa.?= =?UTF-8?q?=20A=20korong=20oszt=C3=A1ly=20hozz=C3=A1ad=C3=A1sa.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hanoi/Korong.java | 54 +++++++++++++++++++++++++++++++++++ src/hanoi/Rud.java | 65 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+) create mode 100644 src/hanoi/Korong.java create mode 100644 src/hanoi/Rud.java diff --git a/src/hanoi/Korong.java b/src/hanoi/Korong.java new file mode 100644 index 0000000..ffc71e5 --- /dev/null +++ b/src/hanoi/Korong.java @@ -0,0 +1,54 @@ +package hanoi; + +import javafx.scene.paint.Color; +import javafx.scene.shape.Rectangle; + +public class Korong { + + private Color szin; + private double szelesseg; + private double magassag; + private Rectangle tlap; + + public Korong(Color szin, double szelesseg, double magassag) { + super(); + this.szin = szin; + this.szelesseg = szelesseg; + this.magassag = magassag; + } + + public Color getSzin() { + return szin; + } + + public void setSzin(Color szin) { + this.szin = szin; + } + + public double getSzelesseg() { + return szelesseg; + } + + public void setSzelesseg(double szelesseg) { + this.szelesseg = szelesseg; + } + + public double getMagassag() { + return magassag; + } + + public void setMagassag(double magassag) { + this.magassag = magassag; + } + + public Rectangle getTlap() { + return tlap; + } + + public void setTlap(Rectangle tlap) { + this.tlap = tlap; + } + + + +} diff --git a/src/hanoi/Rud.java b/src/hanoi/Rud.java new file mode 100644 index 0000000..b0761fe --- /dev/null +++ b/src/hanoi/Rud.java @@ -0,0 +1,65 @@ +package hanoi; + +import java.util.ArrayList; + +import javafx.scene.paint.Color; +import javafx.scene.shape.Rectangle; + +public class Rud { + + private Color szin; + private double szelesseg; + private double magassag; + private ArrayList korongok; + private Rectangle tlap; + + public Rud(Color szin, double szelesseg, double magassag) { + super(); + this.szin = szin; + this.szelesseg = szelesseg; + this.magassag = magassag; + } + + public Rud(Rectangle tlap) { + super(); + this.tlap = tlap; + this.szin = (Color)tlap.getFill(); + this.szelesseg = tlap.getWidth(); + this.magassag = tlap.getHeight(); + } + + public Color getSzin() { + return szin; + } + + public void setSzin(Color szin) { + this.szin = szin; + } + + public double getSzelesseg() { + return szelesseg; + } + + public void setSzelesseg(double szelesseg) { + this.szelesseg = szelesseg; + } + + public double getMagassag() { + return magassag; + } + + public void setMagassag(double magassag) { + this.magassag = magassag; + } + + public Rectangle getTlap() { + return tlap; + } + + public void setTlap(Rectangle tlap) { + this.tlap = tlap; + } + + + +}