"Jim - FooBar();" <jimpil1...@gmail.com> writes:

> No what i have in IPiece is 'updatePosition' so each piece knows how
> to update its position.

Ok.

>> And when you say you have reflection warnings, can it be that you call a
>> protocol method foo with (.foo o) [note the .-syntax]...
> I'msure you will understand if you see the code:
>
> (defn move
> "The function responsible for moving Pieces. Each piece knows how to move
> itself. Returns the new board."
>  ^clojure.lang.LazySeq
> [^clojure.lang.Symbol game mappings ^Clondie24.core.IPiece p coords]
> {:pre [(satisfies? IPiece p)]}  ;safety comes first
> (if (in? mappings (vector-of-doubles coords)) ;check that position exists on
> the grid
> (do  (.update-position p coords) ;coords should be of the form [x, y]

What's update-position?  Shouldn't that be (updatePosition p coords), as
you say IPieces have an updatePosition method?  And since you use that
for side effects (you don't use the return value), are your IPiece
implementors actually deftypes with :volatile-mutable or
:unsynchronized-mutable fields?

You see, it's still far from clear to me. ;-)

Bye,
Tassilo

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to