Create Journals
Update Journals

Journals
Find Users
Random

Read
Search
Create New

Communities
Latest News
How to Use

Support
Privacy
T.O.S.

Legal
Username:
Password:

~Questioning Reality~ (thebrokenplate) wrote,
@ 2005-04-12 01:02:00
Previous Entry  Add to memories!  Add to Topic Directory  Tell a Friend!  Next Entry

    Current mood: drained
    Current music:Moby - Inside

    ok so 10 hours into my program and this is all I have done...I hate being stupid.

    (define-struct slot-machine (w-l w-m w-r))
    ;; A slot machine is a structure where (make-slot-machine (symbol-a symbol-b symbol-c))
    #|
    Template for slot-machine
    f : Slot-machine ->
    (define (f asm)
    ...(f (slot-machine-w-l))...
    ...(f (slot-machine-w-c))...
    ...(f (slot-machine-w-r))...))
    |#


    ;;rando : list -> symbol
    ;;takes a list and randomly chooses one of the elements from within the list
    ;;first wheel randomizer
    (define w-llist (list . . . . .
    . . . . .
    . . . . .
    . . . .))

    ;;randomizing function (los -> symbol)
    ;;returns a random symbol from a list of symbols
    (define (w-l list)
    (nth list (random (length list))))

    (define (nth l n)
    (cond
    [(zero? n)(first l)]
    [(empty? l) empty]
    (else (nth (rest l) (- n 1)))))
    ;;second wheel randomizer (w-l w-clist)
    (define w-clist (list . . . . . .
    . . . . .
    . . . ..
    . . . . . .))

    ;;third wheel randomizer (w-l w-rlist)
    (define w-rlist (list . . . . .
    . . . . .
    . . . . .
    . . . . . .))

    ;;;make the slot machine
    ;(make-slot-machine (w-l w-llist)(w-l w-clist)(w-l w-rlist))

    ;;structure -> image
    ;;imageslot : (make-slot-machine w-l w-c w-r)--> (make-slot-machine image image image)
    ;
    ;(place-image
    ;(on-key-event r (make-slot-machine (w-l w-llist)(w-l w-clist)(w-l w-rlist)))
    (define (draw-slots symbol)
    (cond
    [(symbol=? 'run symbol)(place-image (w-l w-llist) 80 80
    (place-image (w-l w-clist) 200 80
    (place-image (w-l w-rlist) 320 80 (empty-scene 500 180))))]
    [else (display "you suck")]))

    (define (win? placed-slots)
    (cond
    [(symbol=? 'run placed-slots)
    (cond
    [(equal? (draw-slots 'run)( .* *))"you win"]
    [else (display "bite me")])]))






    (define writeln
    (lambda (args)

    (for-each display args)
    ))


    ...shoot me please



(Read comments)

Post a comment in response:

From:
 
Username:  Password: 
Subject:
No HTML allowed in subject
 

No Image
 

 Don't auto-format:
Message:
Enter the security code below.


Notice! This user has turned on the option that logs your IP address when posting.

Allowed HTML: <a> <abbr> <acronym> <address> <area> <b> <bdo> <big> <blockquote> <br> <caption> <center> <cite> <code> <col> <colgroup> <dd> <dd> <del> <dfn> <div> <dl> <dt> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr> <i> <img> <ins> <kbd> <li> <li> <map> <marquee> <ol> <p> <pre> <q> <s> <samp> <small> <span> <strike> <strong> <sub> <sup> <table> <tbody> <td> <tfoot> <th> <thead> <tr> <tt> <u> <ul> <var> <xmp>
© 2002-2008. Blurty Journal. All rights reserved.