E prime casino game code

Cognitology mspape at cognitology.eu
Thu May 23 07:59:44 UTC 2013


Hi,

Personally, I would just show a little movie (E-Prime 2, otherwise movie
converted to BMP) of a roulette wheel (easy to make in flash, for instance),
show that spinning for a bit and write a big number in a central square that
is either black or red. More to the point, it seems to me like Corey has
never used E-Prime before and should first work through the tutorial or
http://step.psy.cmu.edu/materials/EPrimer.pdf because otherwise it’s a bit
like telling an illiterate how to write an essay in ms word.

 

(I did like your all-out canvas approach to the problem, btw)

Best,

Michiel

 

From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf
Of ben robinson
Sent: 22. May 2013 16:36
To: eprime
Subject: Re: E prime casino game code

 

It won't be the easiest thing to do if you've never programmed before, but
not impossible. Take it one step at a time. Here's how I made a roulette
wheel recently:

1) Learn to drawn a circle onscreen in an inline. This will eventually be
your roulette wheel.

2) Learn to drawn radii at regular intervals around the circle, for as many
slices as you'll want on your wheel. Use code to iterate the drawing of the
first radius as many times as you need around the circle (For radiusNumber =
1 to NUMBER_OF_TOTAL_RADII; Next radiusNumber).

3) Try to assign a different color to each slice for as many outcomes as you
anticipate needing on your wheel - if it's just win vs not win, you'll only
need two colors.

4) Now whatever code you've used to accomplish the above, try to make that
iterative (using a similar For Loop) so that the same wheel you've just
drawn can be drawn once for each step of a full rotation, because eventually
the wheel will need to spin and you want the colors of your slices to travel
with their respective slices around a full rotation.

5) Save each step of this iterative drawing process to a different
offScreenCanvas so that you can later copy and paste the various
offScreenCanvases onto your main cavas.

6) Draw a little arrow or something to indicate visually the location where
a winning slice will be determined. You know, the ticker thing that goes
tic-tic-tic-tic-tic like in The Price Is Right.

7) Write code to draw the wheel spinning for a period of time. Maybe find a
.wav file online for the sound of a roulette wheel spinning, and draw the
wheel spinning for as long as it takes the .wav file to play to completion.
Make sure you add enough randomness to this spinning process or it will be
easy for the participant to anticipate given the wheel's starting position,
which slice will wind up a winner.

8) Write code to check the color of the pixel shown near the point of your
arrow, and perform different actions given this color. This way, when the
wheel finishes spinning, you check to see the color of the slice immediately
in front of the arrow. This is the winning slice, and the color of the pixel
should tell you what outcome to present the participant.

 

Hope that helps.

 

On Tue, May 21, 2013 at 9:19 PM, Corey Christner <cchristner91 at gmail.com>
wrote:

Hey everyone,

I'm a Junior psychology student, and am conducting an experiment dealing
with Gambler's Fallacy this fall. I am trying to find code for a roulette
wheel game, or at least get tips on how to write one. I'm brand new to the E
prime program so any help would be appreciated. If you would like any more
information or have any questions to ask, feel free! 

-Corey

-- 
You received this message because you are subscribed to the Google Groups
"E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to e-prime+unsubscribe at googlegroups.com
<mailto:e-prime%2Bunsubscribe at googlegroups.com> .
To post to this group, send email to e-prime at googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/e-prime/c6cecb9a-c34f-4afd-a9b3-72178bd99b
b7%40googlegroups.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

 

-- 
You received this message because you are subscribed to the Google Groups
"E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to e-prime+unsubscribe at googlegroups.com.
To post to this group, send email to e-prime at googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/e-prime/CABkDJUd9cipoO-gUrw8ssoFMTYm3rcPOz
mN4-gDKqkHRydp3Rg%40mail.gmail.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+unsubscribe at googlegroups.com.
To post to this group, send email to e-prime at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/001e01ce578b%247cfa1d40%2476ee57c0%24%40eu?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20130523/ac25d5ec/attachment.htm>


More information about the Eprime mailing list