Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,28 @@
CHARACTER list*1000
NN = ALIAS($Panacea, $Ichor, $Gold, wSack, wPanacea, wIchor, wGold, vSack, vPanacea, vIchor, vGold)
NN = (3000, 1800, 2500, 25, 0.3, 0.2, 2.0, 0.25, 0.025, 0.015, 0.002)
maxItems = ALIAS(maxPanacea, maxIchor, maxGold)
maxItems = ( MIN( wSack/wPanacea, vSack/vPanacea), MIN( wSack/wIchor, vSack/vIchor), MIN( wSack/wGold, vSack/vGold) )
maxValue = 0
DO Panaceas = 0, maxPanacea
DO Ichors = 0, maxIchor
DO Golds = 0, maxGold
weight = Panaceas*wPanacea + Ichors*wIchor + Golds*wGold
IF( weight <= wSack ) THEN
volume = Panaceas*vPanacea + Ichors*vIchor + Golds*vGold
IF( volume <= vSack ) THEN
value = Panaceas*$Panacea + Ichors*$Ichor + Golds*$Gold
IF( value > maxValue ) THEN
maxValue = value
! this restarts the list, removing all previous entries:
WRITE(Text=list, Name) value, Panaceas, Ichors, Golds, weight, volume, $CR//$LF
ELSEIF( value == maxValue ) THEN
WRITE(Text=list, Name, APPend) value, Panaceas, Ichors, Golds, weight, volume, $CR//$LF
ENDIF
ENDIF
ENDIF
ENDDO
ENDDO
ENDDO

View file

@ -0,0 +1,4 @@
value=54500; Panaceas=0; Ichors=15; Golds=11; weight=25; volume=0.247;
value=54500; Panaceas=3; Ichors=10; Golds=11; weight=24.9; volume=0.247;
value=54500; Panaceas=6; Ichors=5; Golds=11; weight=24.8; volume=0.247;
value=54500; Panaceas=9; Ichors=0; Golds=11; weight=24.7; volume=0.247;