Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Craps game.
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
chrispminis




PostPosted: 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.



Craps.zip
 Description:
Compressed, all pics.

Download
 Filename:  Craps.zip
 Filesize:  35.94 KB
 Downloaded:  304 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Thu Dec 08, 2005 9:29 pm   Post subject: (No subject)

It helps to keep all of the files in a single zip folder Smile
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
chrispminis




PostPosted: Thu Dec 08, 2005 9:42 pm   Post subject: (No 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?
do_pete




PostPosted: Thu Dec 08, 2005 9:58 pm   Post subject: (No 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
chrispminis




PostPosted: Thu Dec 08, 2005 10:21 pm   Post subject: (No subject)

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




PostPosted: Thu Dec 08, 2005 10:46 pm   Post subject: (No 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
iker




PostPosted: Thu Dec 08, 2005 10:56 pm   Post subject: (No 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?
chrispminis




PostPosted: Thu Dec 08, 2005 11:45 pm   Post subject: (No 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.
Sponsor
Sponsor
Sponsor
sponsor
didsbub




PostPosted: Fri Dec 09, 2005 10:44 am   Post subject: (No subject)

Fun game, good time waster
nastynika




PostPosted: Fri Dec 09, 2005 11:03 am   Post subject: (No subject)

Rolling Eyes it sucks so do a lot of games though
do_pete




PostPosted: Fri Dec 09, 2005 11:53 am   Post subject: (No 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))
codemage




PostPosted: Fri Dec 09, 2005 1:05 pm   Post subject: (No 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
Clayton




PostPosted: Wed Jan 11, 2006 6:35 pm   Post subject: (No 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
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 13 Posts ]
Jump to:   


Style:  
Search: