diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..e7e9d11 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,2 @@ +# Default ignored files +/workspace.xml diff --git a/.idea/AL-2020.iml b/.idea/AL-2020.iml new file mode 100644 index 0000000..c956989 --- /dev/null +++ b/.idea/AL-2020.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/dictionaries/Pawe_ukaszewicz.xml b/.idea/dictionaries/Pawe_ukaszewicz.xml new file mode 100644 index 0000000..e90685c --- /dev/null +++ b/.idea/dictionaries/Pawe_ukaszewicz.xml @@ -0,0 +1,7 @@ + + + + farcing + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..28a804d --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..2e98bb9 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/objects/Field.js b/objects/Field.js new file mode 100644 index 0000000..1c9e19a --- /dev/null +++ b/objects/Field.js @@ -0,0 +1,14 @@ +class Field { + constructor(x, y, isEmpty) { + this.xField = x; + this.yField = y; + this.isFieldEmpty = isEmpty; + } + getCoordinates(){ + return this.xField + this.yField; + } + + getStatus(){ + return this.isFieldEmpty; + } +} \ No newline at end of file diff --git a/objects/Product.js b/objects/Product.js new file mode 100644 index 0000000..e8cb38b --- /dev/null +++ b/objects/Product.js @@ -0,0 +1,8 @@ +class Product { + constructor(name, type, farcing, price) { + this.name = name; + this.type = type; + this.farcing = farcing; + this.price = price + } +} \ No newline at end of file diff --git a/objects/Rack.js b/objects/Rack.js new file mode 100644 index 0000000..2793af8 --- /dev/null +++ b/objects/Rack.js @@ -0,0 +1,17 @@ +class Rack{ + constructor(noOfShelf) { + this.noOfShelf = noOfShelf; + } + + addShelf(){ + this.noOfShelf = this.noOfShelf + 1; + } + + isEmpty(){ + if (this.noOfShelf === 0){ + return true; + }else { + return false; + } + } +} \ No newline at end of file diff --git a/objects/Shelf.js b/objects/Shelf.js new file mode 100644 index 0000000..513d182 --- /dev/null +++ b/objects/Shelf.js @@ -0,0 +1,5 @@ +class Shelf { + constructor(number) { + this.number = number; + } +} \ No newline at end of file