The chance() method returns an integer value representing the chance to draw the card itself, not the following card this would not make sense.
The basic value is 100 (-> 100%).
It works because there is an instance for each card, created and pushed into a list at the start of the program, so when we draw a card we just iterate over all existing cards and call the chance() method.
Now we add them all together, choose a random number between 0 and the value we got and look which card is choosen.
Even if there would be no instance of each card all we would have to do is switching the method to static, but nevertheless we need to ask each card at the start of the program if it brings any new mods or items to the teaseviewer, so thats where the instance already comes from.
Core Set
- Inside7shadows
- Created software for the community!
- Keys: 5,55
- Posts: 230
- Joined: 25 Jun 2015, 02:34
- Location: Colorado
- Gender: Male
- Type: Dominant
- Orientation: Straight
- Contact:
Wait - is the tease generated as you go, or is it all written up front?
I'm also curious how you run code from the card itself. Do you parse the text and feed it into a nested control statement, or can you write to file and execute it as a .jar? I always find myself wanting to do this, but I can never figure out how. I just figured it's hard because it's incredibly insecure and no one wants you to run dynamic code.
I'm also curious how you run code from the card itself. Do you parse the text and feed it into a nested control statement, or can you write to file and execute it as a .jar? I always find myself wanting to do this, but I can never figure out how. I just figured it's hard because it's incredibly insecure and no one wants you to run dynamic code.
- 0131
- Site Admin
- Keys: 1 036,78
- Posts: 1021
- Joined: 06 Jun 2015, 18:12
- Gender: Female
- Type: Switch
- Orientation: Bi
- Contact:
The tease is generated while you tease because your decisions / cards can and will impact how and which cards you draw.
Im using java reflections its the only way to do it in java, sadly there is no "real" reflection in java.
We would have a very limited set of instructions without reflections, and that would be pretty lame.
(some sort of expressionparser = cti code language would be needed, too much work)
If you wanna know more, i can show you around via skype just ask.
Im using java reflections its the only way to do it in java, sadly there is no "real" reflection in java.
We would have a very limited set of instructions without reflections, and that would be pretty lame.
(some sort of expressionparser = cti code language would be needed, too much work)
If you wanna know more, i can show you around via skype just ask.
༼ つ ◕_◕ ༽つ Can i has CTI pls
- Inside7shadows
- Created software for the community!
- Keys: 5,55
- Posts: 230
- Joined: 25 Jun 2015, 02:34
- Location: Colorado
- Gender: Male
- Type: Dominant
- Orientation: Straight
- Contact:
Definitely doesn't work in C++. I always figured it would work in LISP.
I appreciate the hands on invite, but at this time I can't promise my undivided attention.
I appreciate the hands on invite, but at this time I can't promise my undivided attention.
- Inside7shadows
- Created software for the community!
- Keys: 5,55
- Posts: 230
- Joined: 25 Jun 2015, 02:34
- Location: Colorado
- Gender: Male
- Type: Dominant
- Orientation: Straight
- Contact:
Bondage without items, eh? Sounds like stretches.
I would recommend having a player hold their arms in a Strappedo.
You could hold your mouth open (invisible ball gag).
Full Lotus position is annoying?
Splits (as far as you can) is a good position.
Maybe hold your thumbs in your palms and only use your pointer fingers?
I would recommend having a player hold their arms in a Strappedo.
You could hold your mouth open (invisible ball gag).
Full Lotus position is annoying?
Splits (as far as you can) is a good position.
Maybe hold your thumbs in your palms and only use your pointer fingers?
-
- Information
-
Who is online
Users browsing this forum: No registered users and 2 guests