GithubHelp home page GithubHelp logo

wonderland-clojure-katas's Introduction

wonderland-clojure-katas

These are a collection of Clojure katas inspired by Lewis Carroll and Alice in Wonderland.

Alice and the tiny door

“Curiouser and curiouser!” -- ― Lewis Carroll, Alice in Wonderland

How to Do the Katas

First, clone or fork this repo. Each of the katas are in their own directory and are self contained Clojure projects. You cd into the project and run clj -X:test to show the failing tests, then complete the code to make the tests pass. Each project has the instructions in its own README.md file.

For example, to get started on the alphabet-cipher kata first.

  1. Clone or Fork this repo
  2. cd alphabet-cipher
  3. run clj -X:test
  4. Check out the alphabet cipher instructions in the README.md.
  5. Add the code in the source files to make the tests pass.

License

Copyright © 2014 Carin Meier

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

wonderland-clojure-katas's People

Contributors

aaronj1335 avatar adql avatar aquaraga avatar bradlucas avatar davidbecker avatar davidpham87 avatar drewkit avatar emmagordon avatar fachammer avatar gensym avatar gigasquid avatar gnandretta avatar ilyabe avatar isidore avatar ivern avatar julianjelfs avatar justinspedding avatar kuchichan avatar m1kal avatar madhat2r avatar meiji163 avatar metamorph avatar miner avatar paulhenrich avatar raydel95 avatar ronnac avatar saicheong avatar tangarts avatar yzernik avatar zelark avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wonderland-clojure-katas's Issues

The rules of war are wrong

In the game, if you have a tie, you don't resolve based on suit.

You deal three more cards from each hand and then 1 more that fights the war again. All cards go to the winner. If there is another tie, 3 more cards and fight again.

The main issue with the current rules is whomever receives the Ace of Hearts wins the game, as they can never lose the game as they can never run out of cards (nothing evers beats the ace of hearts)

Doublets

Hi again, @gigasquid, and thanks for the quick fix of the alphabet cipher. 😃 I have encountered a few similarly small issues with the Doublets challenge which I'll try to explain here.

Vector of strings vs. string of words

Here's some output from my terminal to illuminate the problem:

expected: (= ["head" "heal" "teal" "tell" "tall" "tail"] (doublets "head" "tail"))

expected: (= ["door boor book look lock"] (doublets "door" "lock"))

The first one expects a vector of single-word strings while the second one (and a few more) expect a vector of one string containing several words. I imagine the first one is the intended one, but as long as they agree on the format it should be fine.

Missing words

When I run the tests (after making changes like the one I described above) I'm unable to make some of the connections made in the test cases. It seems the word list is simply missing some words:

expected: (= ["head" "heal" "teal" "tell" "tall" "tail"] (doublets "head" "tail"))
  actual: (not (= ["head" "heal" "teal" "tell" "tall" "tail"] ("head" "heal" "teal" "tell" ... "tail")))

expected: (= ["door" "boor" "book" "look" "lock"] (doublets "door" "lock"))
  actual: (not (= ["door" "boor" "book" "look" "lock"] ("door" "boor" ... "lock")))

My code's inserting '... when it fails to find a matching and, indeed, I can't seem to find tall or book in the word list.

Problem with fox-goose-bag-of-corn.puzzle?

My implementation seems to be finding another solution that is seemingly valid and of the same length. I'm sure there are other solutions as well. I think the tests should be rewritten to accept more than just the hardcoded solution.

[[#{:you :fox :goose :corn} #{:boat} #{}]
[#{:fox :corn} #{:you :boat :goose} #{}]
[#{:fox :corn} #{:boat} #{:you :goose}]
[#{:fox :corn} #{:you :boat} #{:goose}]
[#{:you :fox :corn} #{:boat} #{:goose}]
[#{:corn} #{:you :fox :boat} #{:goose}]
[#{:corn} #{:boat} #{:you :fox :goose}]
[#{:corn} #{:you :boat :goose} #{:fox}]
[#{:you :goose :corn} #{:boat} #{:fox}]
[#{:goose} #{:you :boat :corn} #{:fox}]
[#{:goose} #{:boat} #{:you :fox :corn}]
[#{:goose} #{:you :boat} #{:fox :corn}]
[#{:you :goose} #{:boat} #{:fox :corn}]
[#{} #{:you :boat :goose} #{:fox :corn}]
[#{} #{:boat} #{:you :fox :goose :corn}]]

Alphabet cipher

Hi, @gigasquid, and thanks for the cool project.

When encoding meetmebythetree under key scones, shouldn't the encoding be egsgqwtahuiljgs--that is, the sequence shifted one further? Every time I do it by either hand or computation this is what I end up with. If this is in fact an off-by-one error it's present for the decryption test as well.

Rules for tie in round (card-war-game)

Hello,

I just wanted to check if I should take in consideration the suits in consideration when there is a tie considering the ranks.

Both the war games rules and the example scenario state that we should not consider the suits. However, there are some tests that expect that the round results should consider the suits.

If we should not take the suits into account, I believe some of the tests need to be rewritten (I can submit a PR with changes).

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.