Adjust project after new enum value addition
This commit is contained in:
parent
48560fb3a1
commit
df70b321ae
@ -1 +0,0 @@
|
||||
FOOD|THREE_QUARTERS_TO_FULL|ZERO_TO_QUARTER|THREE_QUARTERS_TO_FULL|GE_8|LT_3|GE_3_LT_8
|
@ -21,9 +21,11 @@ class ExamplesManager:
|
||||
|
||||
file = open(self.examplesFilePath, "r")
|
||||
|
||||
line = file.readline()
|
||||
lineNum = 0
|
||||
while line != "":
|
||||
while True:
|
||||
line = file.readline()
|
||||
if line == "":
|
||||
break
|
||||
lineNum += 1
|
||||
words = line.split("|")
|
||||
|
||||
@ -117,7 +119,6 @@ class ExamplesManager:
|
||||
dstFromRest)
|
||||
|
||||
examples.append(example)
|
||||
line = file.readline()
|
||||
file.close()
|
||||
|
||||
return examples
|
||||
@ -133,11 +134,11 @@ class ExamplesManager:
|
||||
example: SurvivalDTExample
|
||||
for example in examplesToAdd:
|
||||
strToWrite = "\n{}|{}|{}|{}|{}|{}|{}".format(example.classification.name,
|
||||
example.hungerVal.name,
|
||||
example.thirstVal.name,
|
||||
example.staminaVal.name,
|
||||
example.distFromFood.name,
|
||||
example.distFromWater.name,
|
||||
example.distFromRestPlace.name)
|
||||
example.hungerVal.name,
|
||||
example.thirstVal.name,
|
||||
example.staminaVal.name,
|
||||
example.distFromFood.name,
|
||||
example.distFromWater.name,
|
||||
example.distFromRestPlace.name)
|
||||
file.write(strToWrite)
|
||||
file.close()
|
||||
|
Loading…
Reference in New Issue
Block a user