From 417c697bc4621e38069f1799545b9f6ed5672af4 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 30 Apr 2018 10:44:42 +0200 Subject: [PATCH] Refactoring --- .vs/AAWeb/v15/.suo | Bin 67072 -> 67072 bytes CompetitionStorage.js | 6 +++--- Files/{File.js => SingleFile.js} | 4 ++-- ProductStorage.js | 10 +++++----- Project.njsproj | 2 +- index.html | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) rename Files/{File.js => SingleFile.js} (98%) diff --git a/.vs/AAWeb/v15/.suo b/.vs/AAWeb/v15/.suo index 5a616276cb9b6003e8a4bdac3b92d04efa62166e..01576ca0cbcdc3f9feef3ede87be9a06932573b1 100644 GIT binary patch delta 1717 zcmcJPYfM~46vy|>-n$Rjt_urDVTH?vBEk~b3Ju^|O4%a8%ByN(trf78Vv#nKmOwOJ z{31y)g*{YlT1mLtMiUI|jvuVF3f2cntJ2m-f)!Ujw~02`+Q`E*aJMNrnJyNeH)}qtt^u)sA;v$(PKPFK94}gRzEZIErWBlCC&=v6VgRBCuWu zA=ZoGBY)XjTzpyc_w`lV@vPY+y-o?7gDR5el3p>@b{u?>)X5@sj=gpgJAAY{!Y$h|Y}mUV+Rm#^6ZvI)dvM68xWn;g@(!-1)?&$Kt38mQ#VNJR;GHG zKdDVFqOI+`BdHRwtkxwbQpou2BBMpEXKIB(eU+gv-pQTMPJ_R5LK5OF-DI}K0Zk+zyiOJ{eSl53N{m1sGK88fZ^{S*5gN`nf%Su2aGs*DupM0JOokV=M^5} zJK2JvVTI+pwO%jj@#=}x`xYLS#rvL4M-^b*=vJ&9GGWE1f1y0Kd!>l372#OsJ)vP) zaV+|z97h5cv-nAg->P>>xxzCe7#PXqS?^x~{Oy<>kG^C3kIt3R1e`l(;+D^*;eYMy zYaDw|(vF%1@vwR17c~qU6dOM>c?dB2Ogd$L26d9*%=vcg8g=n~V=stUonYz@63!g( z;K+3o_x^O&h-@LB=U<)xb(*2EJB_E!OzDGDjA3eP8s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Y#_c%K diff --git a/CompetitionStorage.js b/CompetitionStorage.js index d0ddd77ba..3b27b00ea 100644 --- a/CompetitionStorage.js +++ b/CompetitionStorage.js @@ -53,9 +53,9 @@ function newCompetitionStorage(pName) { case 'Single File': { - let file = newFile(); - file.initialize(devTeam, bot, product, thisSet, undefined, undefined, onSingleFileReady); - thisObject.files.set(pCompetition.participants[i].devTeam + "-" + pCompetition.participants[i].bot, file); + let singleFile = newSingleFile(); + singleFile.initialize(devTeam, bot, product, thisSet, undefined, undefined, onSingleFileReady); + thisObject.files.set(pCompetition.participants[i].devTeam + "-" + pCompetition.participants[i].bot, singleFile); dataSetsToLoad++; if (CONSOLE_LOG === true) { diff --git a/Files/File.js b/Files/SingleFile.js similarity index 98% rename from Files/File.js rename to Files/SingleFile.js index 3ef68497a..352ab2c03 100644 --- a/Files/File.js +++ b/Files/SingleFile.js @@ -1,7 +1,7 @@  -function newFile() { +function newSingleFile() { - const MODULE_NAME = "File"; + const MODULE_NAME = "Single File"; const INFO_LOG = false; const ERROR_LOG = true; const logger = newDebugLog(); diff --git a/ProductStorage.js b/ProductStorage.js index 41d5ae797..808f0995f 100644 --- a/ProductStorage.js +++ b/ProductStorage.js @@ -16,7 +16,7 @@ function newProductStorage(pName) { Product Storage | - |-----> File + |-----> SingleFile | |-----> FileSequence | @@ -30,7 +30,7 @@ function newProductStorage(pName) { marketFiles: [], dailyFiles: [], - file: [], + singleFile: [], fileSequence: [], setDatetime: setDatetime, @@ -96,9 +96,9 @@ function newProductStorage(pName) { if (INFO_LOG === true) { logger.write("[INFO] initialize -> Single File -> key = " + pDevTeam.codeName + "-" + pBot.codeName + "-" + pProduct.codeName); } - let file = newFile(); - file.initialize(pDevTeam, pBot, pProduct, thisSet, pExchange, pMarket, onSingleFileReady); - thisObject.file.push(file); + let singleFile = newSingleFile(); + singleFile.initialize(pDevTeam, pBot, pProduct, thisSet, pExchange, pMarket, onSingleFileReady); + thisObject.singleFile.push(singleFile); dataSetsToLoad++; } break; diff --git a/Project.njsproj b/Project.njsproj index 4eb805a34..1422d6f06 100644 --- a/Project.njsproj +++ b/Project.njsproj @@ -59,7 +59,7 @@ Code - + Code diff --git a/index.html b/index.html index 68ec64a90..1fee9aea2 100644 --- a/index.html +++ b/index.html @@ -66,7 +66,7 @@ - +