Michael's Flower Garden inspired me to play with the games/cards,
but...the z-ordering of add-cards is backwards for every use that I've
been able to think of.  I want the first card to be on the bottom, as if
I were dealing cards.

For now I have defined a function which reverses the card list and
inverts the indices:

(define (add-cards-to-table t d x y [off (lambda (i) values 0 0)])
  (define n (length d))
    (define (o i) (off (- n i 1)))
          (send table add-cards (reverse d) x y o))

But then I have to remember to invoke it differently than any other
table method, which is annoying.

So how should I go about overriding that method so that I have a table
where (send table add-cards ...) uses the opposite z-ordering, without
messing with the game/cards source?

I was thinking that I could sub-class table and override the method,
but...then game/cards doesn't export table%, only a make-table function
and the interface.  And I couldn't figure out how to make a sub-class
given just an interface or an interface and an object.

--Josh

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to