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")
|
file = open(self.examplesFilePath, "r")
|
||||||
|
|
||||||
line = file.readline()
|
|
||||||
lineNum = 0
|
lineNum = 0
|
||||||
while line != "":
|
while True:
|
||||||
|
line = file.readline()
|
||||||
|
if line == "":
|
||||||
|
break
|
||||||
lineNum += 1
|
lineNum += 1
|
||||||
words = line.split("|")
|
words = line.split("|")
|
||||||
|
|
||||||
@ -117,7 +119,6 @@ class ExamplesManager:
|
|||||||
dstFromRest)
|
dstFromRest)
|
||||||
|
|
||||||
examples.append(example)
|
examples.append(example)
|
||||||
line = file.readline()
|
|
||||||
file.close()
|
file.close()
|
||||||
|
|
||||||
return examples
|
return examples
|
||||||
@ -133,11 +134,11 @@ class ExamplesManager:
|
|||||||
example: SurvivalDTExample
|
example: SurvivalDTExample
|
||||||
for example in examplesToAdd:
|
for example in examplesToAdd:
|
||||||
strToWrite = "\n{}|{}|{}|{}|{}|{}|{}".format(example.classification.name,
|
strToWrite = "\n{}|{}|{}|{}|{}|{}|{}".format(example.classification.name,
|
||||||
example.hungerVal.name,
|
example.hungerVal.name,
|
||||||
example.thirstVal.name,
|
example.thirstVal.name,
|
||||||
example.staminaVal.name,
|
example.staminaVal.name,
|
||||||
example.distFromFood.name,
|
example.distFromFood.name,
|
||||||
example.distFromWater.name,
|
example.distFromWater.name,
|
||||||
example.distFromRestPlace.name)
|
example.distFromRestPlace.name)
|
||||||
file.write(strToWrite)
|
file.write(strToWrite)
|
||||||
file.close()
|
file.close()
|
||||||
|
Loading…
Reference in New Issue
Block a user