Page 2 of 2

Re: Core Set

Posted: 04 Nov 2015, 20:57
by 0131
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.

Re: Core Set

Posted: 18 Nov 2015, 02:38
by Inside7shadows
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.

Re: Core Set

Posted: 18 Nov 2015, 02:49
by 0131
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.

Re: Core Set

Posted: 18 Nov 2015, 03:10
by Inside7shadows
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.

Re: Core Set

Posted: 26 Nov 2015, 02:09
by 0131
Could need 5+ ideas of Bondage cards which do not require any items or options from the personalization menu for the Core Set.
Any ideas?

Re: Core Set

Posted: 29 Nov 2015, 05:25
by Inside7shadows
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?