c.Printf("system %s is all out of space duckets.\n",m.sys)
returnIdle(m.sys)
ifm.money <=0{
c.Printf("system %s is all out of space duckets.\n",m.System)
returnIdle(m.System)
}else{
c.Deposit(1)
m.mined+=1
m.sys.money-=1
m.money -=1
returnm
}
}
func(m*MiningState)Exit(c*Connection){
ifm.sys.money ==0{
c.Printf("Done mining %v. Mined %v space duckets total. %v space duckets remain on %v, and it can be mined again.",m.sys,m.mined,m.sys.money,m.sys)
ifm.money ==0{
c.Printf("Done mining %v.\nMined %v space duckets total.\nNo space duckets remain on %v, and it can't be mined again.\n",m.System,m.mined,m.System)
}else{
c.Printf("Done mining %v. Mined %v space duckets total. No space duckets remain on %v, and it can't be mined again.",m.sys,m.mined,m.sys)
c.Printf("Done mining %v.\nMined %v space duckets total.\n%v space duckets remain on %v, and it can be mined again.\n",m.System,m.mined,m.money,m.System)