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
+24
View File
@@ -0,0 +1,24 @@
from tungston.core.geology.mineral import Mineral
# Class ############################################################################################
class Inclusion:
def __init__(self, mineral:Mineral, weight:int=100):
self.mineral = mineral
self.weight = weight
def __str__(self) -> str:
if self.weight == 100:
return self.mineral.name
return f"{self.mineral.name} ({self.weight}%)"
def __repr__(self) -> str:
return "".join([str(p) for p in [
"Inclusion{",
"mineral: ", self.mineral.name, ", ",
"weight: ", self.weight,
"}"
]])