On Wed, Jun 13, 2012 at 10:46 AM, nicolas.o...@gmail.com
<nicolas.o...@gmail.com> wrote:
> that mutation inside piece is
>> the only non-functional  detail...everything else I am indeed returning new
>> boards, new pieces (promotion, death etc)...
>>
>
And from what I understand of your design, I disagree on a point: I
think it is not true a move is a command apply to
a piece. A lot of moves involve multiple pieces.
So I would try to represent a move as something like:

(defprotocol
   Move
   (can-execute [board] "check the move can be executed on that board")
   (execute [board] "return the board after the move")
    ... )

-- 
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