{"action":"created","issue":{"url":"https://api.github.com/repos/ForthHub/discussion/issues/36","repository_url":"https://api.github.com/repos/ForthHub/discussion","labels_url":"https://api.github.com/repos/ForthHub/discussion/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/ForthHub/discussion/issues/36/comments","events_url":"https://api.github.com/repos/ForthHub/discussion/issues/36/events","html_url":"https://github.com/ForthHub/discussion/issues/36","id":192197058,"number":36,"title":"12 coin problem simulator in jeforth","user":{"login":"hcchengithub","id":1297015,"avatar_url":"https://avatars.githubusercontent.com/u/1297015?v=3","gravatar_id":"","url":"https://api.github.com/users/hcchengithub","html_url":"https://github.com/hcchengithub","followers_url":"https://api.github.com/users/hcchengithub/followers","following_url":"https://api.github.com/users/hcchengithub/following{/other_user}","gists_url":"https://api.github.com/users/hcchengithub/gists{/gist_id}","starred_url":"https://api.github.com/users/hcchengithub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hcchengithub/subscriptions","organizations_url":"https://api.github.com/users/hcchengithub/orgs","repos_url":"https://api.github.com/users/hcchengithub/repos","events_url":"https://api.github.com/users/hcchengithub/events{/privacy}","received_events_url":"https://api.github.com/users/hcchengithub/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":15,"created_at":"2016-11-29T06:16:20Z","updated_at":"2016-12-02T07:07:32Z","closed_at":null,"body":"![image](https://cloud.githubusercontent.com/assets/1297015/20698641/7b35e4c0-b63d-11e6-8a12-1940662569a0.png)\r\n\r\nChocolate factory is in trouble. One of the twelve chocolates is either lighter or heavier. Your job is to find it out by using the sponge floating in a bucket. If you were anticipating a balance scale, the sponge is its substitution.  [Play Now](https://cdn.rawgit.com/hcchengithub/jeforth.3we/develop/index.html?include%2012choc.f) this game works fine on the Google Chrome web browser. To verify your answer, put all chocolates into the water. The lighter floats, the heavier sinks, all others balance in the water.\r\n\r\nIn addition to drag-and-drop the chocolates and the sponge by the mouse, these are useful commands:\r\n\r\n'replay' command to re-assign the defected chocolate.\r\n\r\n'home' command to bring all chocolates and the sponge back to their initial position especially if you have thrown them off the space 😉 \r\n\r\n'view' command to see the list of all chocolates with their weights ( or mass ) and recent positions.\r\n\r\n'freeze' and 'unfreeze' commands work on the water.\r\n\r\nTwelve chocolates are numbered 0 .. 11, command line \"0 1 2 3 2:2\" drops chocolate #0, #1 on the left side and #2, #3 on the right side of the sponge. Similar commands '1:1', '3:3' and friends are to drop corresponding quantities of chocolates respectively. \r\n\r\nAbove the input box and under the canvas is the output box that is where messages are printed to. If they become too many and annoying then, to erase text messages, type 'er' command or press the <backspace> key multiple times when the input box is empty. Press Alt+<backspace> to do the same thing but erase from top of the output box.\r\n\r\nYou probably won't need to know this, but messages on the output box can be none-text, i.e. HTML elements. To erase them, we need to also press ```<Ctrl>``` key. Thus ```Ctrl+<backspace>``` and ```Alt+Ctrl+<backspace>``` work on HTML elements. If you went too far you might erase the canvas itself, then you need to reload the web page, that can be done by pressing ```<F5>```. \r\n\r\nThis game is written in the Forth programming language, jeforth.3we actually. To view the source code, type 'char 12choc.f readTextFileAuto .' don't miss the ending dot, or [clone the jeforth.3we project from GitHub](https://github.com/hcchengithub/jeforth.3we/tree/develop). There are many other demos. I wish you like them.\r\n\r\nHappy programming!\r\n\r\nH.C. Chen\r\nhcchen5600@gmail.com\r\nFigTaiwan\r\n2016.11.27 \r\n\r\nUpdated: The \"Play now\" URL is now https://cdn.rawgit.com/hcchengithub/jeforth.3we/develop/index.html?include%2012choc.f that has solved the Cross Origin Request issue that happens on IE, Firefox, Edge, ..etc.\r\n"},"comment":{"url":"https://api.github.com/repos/ForthHub/discussion/issues/comments/264388644","html_url":"https://github.com/ForthHub/discussion/issues/36#issuecomment-264388644","issue_url":"https://api.github.com/repos/ForthHub/discussion/issues/36","id":264388644,"user":{"login":"quozl","id":2936481,"avatar_url":"https://avatars.githubusercontent.com/u/2936481?v=3","gravatar_id":"","url":"https://api.github.com/users/quozl","html_url":"https://github.com/quozl","followers_url":"https://api.github.com/users/quozl/followers","following_url":"https://api.github.com/users/quozl/following{/other_user}","gists_url":"https://api.github.com/users/quozl/gists{/gist_id}","starred_url":"https://api.github.com/users/quozl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quozl/subscriptions","organizations_url":"https://api.github.com/users/quozl/orgs","repos_url":"https://api.github.com/users/quozl/repos","events_url":"https://api.github.com/users/quozl/events{/privacy}","received_events_url":"https://api.github.com/users/quozl/received_events","type":"User","site_admin":false},"created_at":"2016-12-02T07:07:32Z","updated_at":"2016-12-02T07:07:32Z","body":"Thanks.\r\n\r\nAs far as I can tell, Sugar Web Activity is a wrapper written in Python which creates a Gtk.Window and calls WebKit2 to load index.html.  Think of it as a browser without controls.  It can be found in the https://github.com/sugarlabs/sugar-toolkit-gtk3.git repository as file `src/sugar3/activity/webactivity.py`\r\n\r\nThe underlying platform is a Linux.  We use both Fedora and Ubuntu as the Linux.\r\n\r\nThere are probably also example activities.  The word *activity* is a jargon for *application* in Sugar."}}
{"actor":{"display_login":"quozl"}}