Computer Science Canada

Craps game.

Author:  chrispminis [ Thu Dec 08, 2005 8:37 pm ]
Post subject:  Craps game.

Well, this is my very first program. Its a simulation of the dice game, craps. Tell me what you think, how I could improve it etc. Please be nice since I'm new to turing.

Edit: I don't understand why, but I can't attach one of my pictures.

Fatal error: Using $this when not in object context in /home/.angela/hackerdan/compsci.ca/v2/attach_mod/includes/functions_thumbs.php on line 226

Well anyways, it just changes the title screen, to get around it simply delete the error coding etc.

Edit: Well, I compressed the program and pictures together in one file, so hopefully all the pictures will work now. But, I reviewed my coding and realized its very sloppy and confusing, so I'm giving up on it for now. May improve on it later.

Author:  Tony [ Thu Dec 08, 2005 9:29 pm ]
Post subject: 

It helps to keep all of the files in a single zip folder Smile

Author:  chrispminis [ Thu Dec 08, 2005 9:42 pm ]
Post subject: 

Alright, i'll keep that in mind next time i make a submission. Also, what is the difference between the source code section and the application section of the turing forums? And any other comments? I know my coding could be shortened by about a billion but how?

Author:  do_pete [ Thu Dec 08, 2005 9:58 pm ]
Post subject: 

haha craps, i never new that was an actual card game, i thought you were calling your game crap. i wonder what they were thinking when they made that name up... Very Happy

Author:  chrispminis [ Thu Dec 08, 2005 10:21 pm ]
Post subject: 

Hmmm... its actually a dice game... Has anyone actually "TRIED" the program yet? Sad Is it working?

Author:  do_pete [ Thu Dec 08, 2005 10:46 pm ]
Post subject: 

Embarassed i meant to say dice game. and no i havn't tried your game yet because my PSP doesn't come with turing

Author:  iker [ Thu Dec 08, 2005 10:56 pm ]
Post subject: 

not a bad game, I suggest you bring the player to the option of rolling again instead of bringing the program back the the startup screen. Another thing, I had to edit the game to actualy play it, by commenting out anything that had to do with the title and win pics... If you are having problems uploading them to this site, try uploading them to photobucket or some other site and having a link posted to download them:) anyways, its a good start

do_pete wrote:
Embarassed i meant to say dice game. and no i havn't tried your game yet because my PSP doesn't come with turing


then why be on the turing forums?

Author:  chrispminis [ Thu Dec 08, 2005 11:45 pm ]
Post subject: 

Well I took Tony's advice and compressed it all, I think the pictures should all work now, I didn't change the the program so that there was a roll again feature and didn't return to the title screen, but I gave up when I saw how messy my coding was. lol.

Author:  didsbub [ Fri Dec 09, 2005 10:44 am ]
Post subject: 

Fun game, good time waster

Author:  nastynika [ Fri Dec 09, 2005 11:03 am ]
Post subject: 

Rolling Eyes it sucks so do a lot of games though

Author:  do_pete [ Fri Dec 09, 2005 11:53 am ]
Post subject: 

try having the dice do a little animation like so:
code:
View.Set ("offscreenonly")
procedure DrawDice (number : int)
    case number of
        label 1 :
            Draw.Box (50, 350, 150, 250, black)                        %the box
            Draw.FillOval (100, 300, 10, 10, black)         % centre point
        label 2 :
            Draw.Box (50, 350, 150, 250, black)                        %the box
            Draw.FillOval (75, 275, 10, 10, black)         % bottom left
            Draw.FillOval (125, 325, 10, 10, black)         % top right
        label 3 :
            Draw.Box (50, 350, 150, 250, black)                        %the box
            Draw.FillOval (100, 300, 10, 10, black)         % centre point
            Draw.FillOval (75, 275, 10, 10, black)         % bottom left
            Draw.FillOval (125, 325, 10, 10, black)         % top right
        label 4 :
            Draw.Box (50, 350, 150, 250, black)                               %the box
            Draw.FillOval (75, 325, 10, 10, black)         % top left
            Draw.FillOval (75, 275, 10, 10, black)         % bottom left
            Draw.FillOval (125, 325, 10, 10, black)         % top right
            Draw.FillOval (125, 275, 10, 10, black)         % bottom right
        label 5 :
            Draw.Box (50, 350, 150, 250, black)                               %the box
            Draw.FillOval (100, 300, 10, 10, black)         % centre point
            Draw.FillOval (75, 325, 10, 10, black)         % top left
            Draw.FillOval (75, 275, 10, 10, black)         % bottom left
            Draw.FillOval (125, 325, 10, 10, black)         % top right
            Draw.FillOval (125, 275, 10, 10, black)         % bottom right
        label 6 :
            Draw.Box (50, 350, 150, 250, black)            %the box
            Draw.FillOval (75, 300, 10, 10, black)     % middle left
            Draw.FillOval (75, 325, 10, 10, black)         % top left
            Draw.FillOval (75, 275, 10, 10, black)         % bottom left
            Draw.FillOval (125, 300, 10, 10, black)         % middle right
            Draw.FillOval (125, 325, 10, 10, black)         % top right
            Draw.FillOval (125, 275, 10, 10, black)         % bottom right
    end case
end DrawDice
for i : 1 .. 10
    DrawDice (Rand.Int (1, 6))
    View.Update
    delay (100)
    cls
end for
DrawDice (Rand.Int (1, 6))

Author:  codemage [ Fri Dec 09, 2005 1:05 pm ]
Post subject: 

The name "craps" is a vulgarization of the word "crabs" - the lowest roll that you can make in the game "Hazzard", upon which craps is based. Idea

Author:  Clayton [ Wed Jan 11, 2006 6:35 pm ]
Post subject: 

um not bad but you really should try to add other features such as telling the user what keys to press in case they dont want to bet all in. dice animation not bad but could be seriously shortened with procedures and labels, but good job, you have to start somewhere Laughing


: