Removed deprecated python file
This commit is contained in:
parent
90715a7fc8
commit
8f72d322dd
75
hpCalcSim.py
75
hpCalcSim.py
@ -1,75 +0,0 @@
|
||||
import random
|
||||
from pyswip import Prolog as pl
|
||||
import itertools as it
|
||||
|
||||
print("Consulting")
|
||||
pl.consult("main.pl")
|
||||
|
||||
HPog = [1,2,3,5]
|
||||
APog = [2,3,4,5]
|
||||
|
||||
HPmult = 2
|
||||
APmult = 2
|
||||
|
||||
simRes = "AP:HP:HPnew\n"
|
||||
|
||||
print(simRes)
|
||||
|
||||
for i in range(0,4):
|
||||
HP = HPog
|
||||
AP = HPog
|
||||
match i:
|
||||
case 0:
|
||||
caseString = "## Calculating without Multipliers ##"
|
||||
print(caseString)
|
||||
simRes += caseString
|
||||
|
||||
case 1:
|
||||
caseString = "\n## Calculating with Attack Multipliers ##"
|
||||
print(caseString)
|
||||
simRes += caseString
|
||||
AP = [point * 2 for point in AP]
|
||||
|
||||
case 2:
|
||||
caseString = "\n## Calculating with Defense Multipliers ##"
|
||||
print(caseString)
|
||||
simRes += caseString
|
||||
HP = [point * 2 for point in HP]
|
||||
|
||||
|
||||
case 3:
|
||||
caseString = "\n## Calculating with Attack and Defense Multipliers ##"
|
||||
print(caseString)
|
||||
simRes += caseString
|
||||
AP = [point * 2 for point in AP]
|
||||
HP = [point * 2 for point in HP]
|
||||
|
||||
itString = "\n-First Iteration-\n"
|
||||
print(itString)
|
||||
simRes += itString
|
||||
|
||||
liste = [AP, HP]
|
||||
combinations = [p for p in it.product(*liste)]
|
||||
|
||||
newcombs = []
|
||||
|
||||
for comb in combinations:
|
||||
for soln in pl.query("einheit_alive("+str(comb[0])+","+str(comb[1])+", HPnew)"):
|
||||
tmpStr = str(comb[0]) + ":" + str(comb[1]) + ":" + str(soln["HPnew"]) + "\n"
|
||||
print(tmpStr)
|
||||
simRes += tmpStr
|
||||
newcombs.append((comb[0], soln["HPnew"]))
|
||||
|
||||
itString = "-Second Iteration-\n"
|
||||
print(itString)
|
||||
simRes += itString
|
||||
|
||||
for comb in newcombs:
|
||||
for soln in pl.query("einheit_alive("+str(comb[0])+","+str(comb[1])+", HPnew)"):
|
||||
tmpStr = str(comb[0]) + ":" + str(comb[1]) + ":" + str(soln["HPnew"]) + "\n"
|
||||
print(tmpStr)
|
||||
simRes += tmpStr
|
||||
|
||||
|
||||
with open("AttackSimulationResults.txt", "w") as w:
|
||||
w.write(simRes)
|
Loading…
x
Reference in New Issue
Block a user