Thanks for idea, Igor. Seems like some kind of simulation (looking at your example and clojure ants demo) can be a good example of concurrency.
Thank you, Nikita On Sun, Aug 12, 2012 at 2:01 PM, Igor Kupczyński <puszc...@gmail.com> wrote: > Hi, > > For a java course at my university students had to write a railway > simulator - the idea was more or less to write randomly generate a map with > railways and regular roads. Some of the tracks where double (i.e. trains > can go both directions at the same time) and the other just a single track > (one train, one direction at a time). In the the single tracks there were > special bays for trains to wait while a train in the opposite direction is > running. There were passenger trains and cargo trains, but the former had a > priority over the latter (when single tracks were considered). There were > cars on the regular roads (all bidirectional and running at the same > speed), the only challenge for cars was to stop when a road crossed a > railway and there was a train running on that railway. The idea was of > course not cause any collision. The graphics had to pretty simple, i.e. 2d > bird perspective, rectangles representing trains and squares representing > cars. > > Of course this was quite a big end-of-semester assignment. Maybe it will > give you some ideas. > > Thanks, > Igor > > On Thursday, 9 August 2012 17:21:45 UTC+2, Nikita Beloglazov wrote: >> >> Hello >> I'm going to organize little clojure course at my university this year. >> For this I want to implement set of tasks that hopefully will help to >> practise clojure. >> Tasks will be animated so students can see how their solutions work. E.g. >> one of the tasks is to hit plane by missile: there is a plane that flies >> from left to the right with fixed speed. Player launches missile to hit the >> plane. Task is to write a function that takes coordinates of plane and >> player and returns angle for launching missile. Plane's and missile's >> speeds are constant and known. This task requires math and basic clojure >> knowledge (only perform math operations, use let, if, Math/* functions). >> Another example is to implement a bot for snake. Bot is implemented as a >> function that takes snakes position (sequence of cells, each cell is vector >> of 2 values) and apple position (vector of 2 values). Function must return >> what direction to move. This task requires using of clojure seq functions. >> Can somebody propose ideas for this kind of tasks? I'm particularly >> interested in tasks that require different fields of clojure, e.g. I don't >> know what to implement for learning atoms, refs and agends. >> >> Examples of tasks (artillery and snake) can be found here: >> https://github.com/**nbeloglazov/clojure-**interactive-tasks<https://github.com/nbeloglazov/clojure-interactive-tasks>. >> I use quil <https://github.com/quil/quil>for animation. Animation is >> primitive in the tasks (I'm not particularly good at it). >> >> Thank you, >> Nikita Beloglazov >> > -- > 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 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