Darwinbots Forum
Code center => Darwinbots Program Source Code => Topic started by: Botsareus on April 26, 2009, 12:04:06 PM
-
I want to make the following code work from case4 to case7:
Private Sub ExecuteStores(n As Integer)
Select Case n
Case 1 'store
DNAstore
Case 2 'inc
DNAinc
Case 3 'dec
DNAdec
Case 4 '+=
Case 5 '-=
Case 6 '*=
Case 7 '/=
End Select
End Sub
I will like to know two things before I get started:
1.) How much energy I should charge?
store charges: - (SimOpts.Costs(COSTSTORE) * SimOpts.Costs(COSTMULTIPLIER))
inc and dec charge: - (SimOpts.Costs(COSTSTORE) * SimOpts.Costs(COSTMULTIPLIER)) / 10
2.) This is how the /= works if I am not mistaken:
3
20
/=
is the same as:
20 *
3
div
20
store
Am I correct?
-
At the moment those commands are no-ops.
But if you want 'em in, it looks like you have the right idea. Charge 'em as a normal store, and treat them like you did.
-
Sounds like a plan.
-
Ooohh! Sounds like something new to play with soon!
Am I right? I hope I am
-
I'd change their names to something like "addstore, substore, multstore, divstore" to better fit in with the current syntax and to avoid confusion with !=, %= etc.