I suggest you check this out: https://github.com/jimpil/MultiSnake/blob/master/src/multi_snake/core.clj

It is within the LOC you asked and shows a complete snake-game. It has been adopted and extended from the book "Programming Clojure", to handle 2 snakes and some other stuff like dying when hitting the border etc. I actually enjoy playing it :). It's also free on the Pi-Store (in case you own a raspberry-pi).

Before you dive in, take 30 minutes to contemplate how you would do the exact same thing in C# or java. In particular, notice how little state there is and how carefully managed it is :)

HTH,
Jim



On 03/02/14 08:47, Aravindh S wrote:
Hi All,
I am new to clojure and have been working with the language for the past one week. I have got a basic hold of the constructs in clojure. I have been programming for 4 years in C# now. One thing I am not able to comprehend is how clojure programs are structured. In an OO world, I know what are the entities that the program should have, how they will be related etc. I am not able to do the same wit clojure. I agree that words like classes, methods dont make much sense in functional programming. I am precisely looking for a program written in clojure ( A medium level program say about 200 - 300 LOC) which clearly tells how a problem domain should be approached in a functional manner using clojure, how the functions should be organized. A specific solution for specific problem will be helpful.


Thanks
Aravindh.S
--
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
---
You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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
--- You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to