fmt.Fprintf(system.colonizedBy,"mining colony on %s pays you %d space duckets. total: %d space duckets.\n",system.name,reward,system.colonizedBy.money)
}
After(5*time.Second,fn)
}
ifsystem.colonizedBy!=nil{
system.colonizedBy=conn
After(5*time.Second,fn)
return
}
ifconn.money>2000{
conn.Withdraw(2000)
ifsystem.colonizedBy!=nil{
fmt.Fprintf(system.colonizedBy,"your colony on %s has been stolen by %s\n",system.Label(),conn.PlayerName())
}
system.colonizedBy=conn
fmt.Fprintf(conn,"set up a mining colony on %s\n",conn.System().name)
After(5*time.Second,fn)
}else{
fmt.Fprintf(conn,"not enough money! it costs 2000 duckets to start a mining colony\n")