Checkpoint initial implementation

This commit is contained in:
Andrew Miner
2025-10-06 17:41:18 -06:00
parent 773e0a3d85
commit a8b6e6b15e
106 changed files with 3012 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
# Class ############################################################################################
class Proportion:
def __init__(self, name:str, ratio:float):
self.name = name
self.ratio = ratio
def __eq__(self, other) -> bool:
if type(self) != type(other): return False
if self.name != other.name: return False
return True
def __hash__(self) -> int:
return hash(self.name)
def __str__(self) -> str:
return self.name
def __repr__(self) -> str:
return f"Proportion<{self.name}>{{ratio: {self.ratio}}}"
# Constants ########################################################################################
BED = Proportion("bed", 0.1) # salt, nitrate, redbed, loam, bif iron, peat coal
LENS = Proportion("lens", 0.4) # bit.coal, aluminum, lapis, quartzite
LODE = Proportion("lode", 0.7) # au.quartz, mvt lead
BODY = Proportion("body", 1.0) # sed.iron
STOCK = Proportion("stock", 1.3) # tin
VENT = Proportion("vent", 1.6) # sulfur
PIPE = Proportion("pipe", 1.9) # por.copper
ALL = [BED, LENS, LODE, BODY, STOCK, VENT, PIPE]