Git Product home page Git Product logo

enredo's Introduction

Jumble Game in Ruby

Live demo

Motivation

The other day I was watching an episode of NewsRadio S3EP04 where Lisa (Maura Tierney) is reading the newspaper and then Matthew comes along having "the jumble fever" and wants to solve the Jumble of the day, at that moment Lisa joins in the game but she cant figure out the answer, Kathy who is in the back listening comes and joins the two and solves the jumble in a few seconds. Lisa asks her how did she do it, Kathy says, the letters say "pick me, I'm first".

In the same episode, they (Lisa and Dave) mention a book called Flowers for Algernon by Daniel Keyes about a super intelligent mouse. I oughta check it out. I did check out and it is deftly an interesting and touching story.

Moving on... I made a quick duckduckgo search and I found Chicago Tribune's Jumble Daily page, free for anyone to play, in any way I decided to make my own.

I used the following list of English Words.

Ruby code reads the above TXT file and returns a JSON file with 50 selected words. JS code reads that remote JSON file and builds input and h2 tags to display the jumbled words.

ScreenShot

Mobile View

Needed Feature

  1. Select some of the correct letters and build another phrase.
  2. Summarize on the Success-window all the words and their meanings. Currently working on it by feeding a db.

Known Issues

  1. Sometimes 2 of the jumble words are the same. This issue is probably related to the random value. I need to fix this by requesting another word.
  2. When all the correct letters are finally inputted on the boxes it should display a message saying "Congratulations you finished!"
  3. I added a bar at the bottom of each word. It changes only for the first word. The global counter does not match the current word length.
  4. On mobile none of the helping feature work. No correct letter coloring, no bottom bar coloring.
    Probably: Element.setCapture() is deprecated. Use Element.setPointerCapture() instead. For more help https://developer.mozilla.org/docs/Web/API/Element/setPointerCapture
  5. If SPACEBAR is input after a correct input, is double counted as correct thus triggering early display of Success-Window. Fixed by validating such input.

Environment: MacBook Pro, MacOS 15.5

Language: JavaScript, Ruby

Editor: Emacs

enredo's People

Contributors

ndlopez avatar

Watchers

 avatar

Forkers

cjac35

enredo's Issues

Incorrect input

When input a 2nd time an incorrect letter counts it as correct.

Inputs not displayed

On ios inputs are partly displayed. Input tag was resized, to fix might be necessary to widen this tag some pixels.

AutoTAB feature

Added a new function to auto TAB for the next input. It kinda works up to last letter of a word. Where it should jump to next word.

Correct Ans

Once input correct Ans and DEL by accident its already counted as correct. Without even completing the word it marks it as finished. Success window released before finishing.

autoTAB issue 2

Once autoTAB reaches last letter of word the following error occurs:
Uncaught TypeError: document.getElementById(...) is null
Fix this issue together with issue #5

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.