From 5358e809ab53c690496a24d4ee8fe7b0eb7f0902 Mon Sep 17 00:00:00 2001 From: Tomek Date: Mon, 6 Apr 2020 19:23:17 +0200 Subject: [PATCH] Stworzenie agenta i jego okrojonego ruchu --- frontend/Agent.jpg | Bin 0 -> 37219 bytes frontend/index.html | 4 +- frontend/script.js | 103 +++++++++++++++++++++++++++++++++++++++++--- frontend/styles.css | 4 +- objects/Agent.js | 12 ------ 5 files changed, 103 insertions(+), 20 deletions(-) create mode 100644 frontend/Agent.jpg delete mode 100644 objects/Agent.js diff --git a/frontend/Agent.jpg b/frontend/Agent.jpg new file mode 100644 index 0000000000000000000000000000000000000000..6f2e344ce4abc76595fba414fd4a6f8363324347 GIT binary patch literal 37219 zcmeIb2Urx%)-KxP03%s)W+W&|juHe041gd4Dmjc~0RfSyzzm8Cl7oVx1Vu$fKm;T+ zWJE+H$dF+GCCdyF2AFUgzx{>1|L=d!_MW@Xx#u}F^ibWb>F#=KRjs#Hb*-WfP$z(W zhI*&;00_7xL6QJ~iaQ*AGQ`6T0E~?RNdN%$0(1Z)um?;X1P`1b>;M!@L%<&ZqVUK0 zXo%v^G$$xi807)b{FDLqHqHwIFz_4`cx(XxY>{v>z%By22<#&8 ze>{v>z%BxRAn?y@LqS19Srz!ZbKn=~Akcqs3OdkZ!Vl1b=Rn^H z+g*sjAL&PsL;sKg{VaPRzk5&Ep6=Q6dzxqXA2+}7+xLN=f2jl1Vc5yfBLsPzEbUZ4kLP!JJd4;uu^2B9_sa4@&DJKiM- znCag($Q~#SEgftxJp&^sP__@uF%-Io21-jy1GaGmYOiz_)@xk1ms&BM#bf8e0Rp~I5ODo0e+)HRNuIH{*^aLVx9d2EJo{-LM0?@K>+U~mXGIW_(D+sy3TJYnU>>e~7SadT@YUpx8yef!&d zv4Q#8Lqh|lf$iiAvL_hap=>m?A_{cux@Is(KMqmF>w7tmB|k21pchj*i|2B>(#^mv zu8ccC*vZ<@oc((lyYc@jXMbeu&wLF5Oi&0|cu+O~0c>m?0-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St@Y#ujo2FY z$$De)x*{iq>z&@Lf(s3cgA27Tx%+)H#>JoAgyHSHERUiIt!L4oITwFdmNtLlHgA@P zi^y5EzBD&20Q$1165$Fb9!N~AQ*^NQazK<<;^8+o=t91W9e(MMXLpj3b@U|_$Vv(2 zvZS$GFlihgMB^+Qf~>;?CXC_7Yk(JZ3F9BDpjn!mj0P~oSdr>%jM;#*lAN54X)PDlA;%u$={)0_B04YNJYB1Gy)kPIKI&xt?7`{E*^*PZK2y z`YS9amv3rISL4C46GS*}$%)RpADiqw0<+YEOXXdDZQSXh*W#`Wbv?=jh01FKw+aPt5zu zE?O$I@E%PYV{Q_GG;!A}%F}}WgmB1&+-(#W(f0B4SR9q4Hf^ kiA(l_1XNjHVbG8Mh`m@(fR0w Inteligentny wózek - @@ -12,7 +12,7 @@
-
+
diff --git a/frontend/script.js b/frontend/script.js index 59de2ab..061c18e 100644 --- a/frontend/script.js +++ b/frontend/script.js @@ -1,13 +1,77 @@ -import Agent from '../objects/Agent.js'; +//Klasy +class Agent { + constructor(x, y){ + this.xField = x; + this.yField = y; + } + + getid(){ + return this.xField + "-" + this.yField; + } +} +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; + } +} + +class Product { + constructor(name, type, farcing, price) { + this.name = name; + this.type = type; + this.farcing = farcing; + this.price = price + } +} + +class Rack{ + constructor(noOfShelf, typOfProduct) { + this.noOfShelf = noOfShelf; + } + + addShelf(){ + this.noOfShelf = this.noOfShelf + 1; + } + + isEmpty(){ + if (this.noOfShelf === 0){ + return true; + }else { + return false; + } + } +} + +class Shelf { + constructor(number) { + this.number = number; + } +} + + +//Objekty i zmienne var regaly = ['1-1', '1-3', '1-4', '1-6', '1-7', '1-9', '2-1', '2-9', '3-3', '3-4', '3-6', '3-7', '4-1', '4-9', '5-1', '5-3', '5-4', '5-6', '5-7', '5-9'] +const agent = new Agent(3, 0); +//Funkcja uruchamiająca prace calego scriptu function start(){ ponumerujPola(); pokolorujRegaly(); - umiescAgenta(); + umiescAgenta(); + droga(); } +//Funkcja kolorujaca miejsca na planszy gdzie znajduja sie regaly function pokolorujRegaly(){ let x; for(x = 0; x < regaly.length; x++){ @@ -15,6 +79,7 @@ function pokolorujRegaly(){ } } +//Funkcja wyswietlajaca id pol function ponumerujPola(){ let x,y for(x = 0; x < 7; x++){ @@ -25,9 +90,37 @@ function ponumerujPola(){ } } +//Funckja wyswietlajaca agenta gdy ten zmieni polozenie function umiescAgenta() { - const agent = new Agent(3, 0); - id = agent.getid(); - document.getElementById(id).className = 'regal'; + document.getElementById(id).style.backgroundImage = "none"; + id = agent.getid(); + document.getElementById(id).style.backgroundImage = "url('Agent.jpg')"; } +//Funkcja zmieniajaca polozenie agenta o 1 pole +function przemieszczenie(side, time){ + setTimeout(function(){ + if(side == "left") + agent.yField--; + if(side == "right") + agent.yField++; + if(side == "up") + agent.xField--; + if(side == "down") + agent.xField++; + umiescAgenta(); + }, time); +} + +//Funkcja ktora ustala droge agenta do przebycia +function droga() { + przemieszczenie("right", 1000); + przemieszczenie("right", 2000); + przemieszczenie("up", 3000); + przemieszczenie("right", 4000); + przemieszczenie("right", 5000); + przemieszczenie("right", 6000); + przemieszczenie("right", 7000); + przemieszczenie("right", 8000); + przemieszczenie("right", 9000); +} diff --git a/frontend/styles.css b/frontend/styles.css index a88e52e..877c58c 100644 --- a/frontend/styles.css +++ b/frontend/styles.css @@ -28,6 +28,8 @@ height: 100px; width: 100px; background-color: lightyellow; + background-image: none; + background-size: cover; border-color: black; border-width: 1px; border-style: solid; @@ -54,4 +56,4 @@ display: flex; justify-content: center; align-items: center; -} \ No newline at end of file +} diff --git a/objects/Agent.js b/objects/Agent.js deleted file mode 100644 index eb4cbf2..0000000 --- a/objects/Agent.js +++ /dev/null @@ -1,12 +0,0 @@ -class Agent { - constructor(x, y){ - this.xField = x; - this.yField = y; - } - - getid(){ - return this.xField + "-" + this.yField; - } -} - -export default Agent; \ No newline at end of file