(** Zebrajs a constrain problem solving lib **)
Recently I discover that my zebrajs lib was broken, mostly because of type conversion, so I decided that was time to start adding automated testing to the lib.
I didn’t want anything to much complicated so I choose the mocha with should.js and I am very happy with it.
The test file is here they are pretty simple.
Now with tests I hope to avoid breaking the lib and that it became much more stable.
Try it out 😀 and give me some feedback.
Balance is the next version of my ball12 game with a new interface.
Balance is a Logical game inspired by a famous variation of weighing coin mathematical problems.
In this game you have 12 balls, 11 of them have the same weight and 1 of them has a different weight, it could be heavier or lighter. You have a two plate’s scale and your goal is to find which ball has a different weight, and if it is heavier or lighter than the others. You have to find this out with just three weightings to get the best score.
I released the source code of the game here https://github.com/fsvieira/balance. Its a simple small game so I think anyone looking for a ionic/angular example to study may find the code usefully (even if the code is not great, and all messy lol).
If you have read the previews (balls12) game algorithm you will find this one much more easy, because we don’t need to keep track of the individual balls, just total for each group like: Equal, Heavier, Lighter and Unknown.
Maybe I will explain the algorithm on some post, if anyone is interested please post it on the comments.