Giter Club home page Giter Club logo

jumblr's Introduction

Commentary:

Provides a function `jumblr-new-game’ (aliased to `jumblr’) which launches a word game closely based on the old TextTwist by Yahoo.

The interface should be pretty intuitive: it displays a sequence of letters, along with a series of blanks. The blanks represent words which can be made from the letters. You type a word and “submit” it by either hitting SPC or RET; the word replaces one of the blanks if it fits. Hitting SPC or RET with an empty guess reshuffles the letters.

I tried to make the interface pretty responsive; take a look at the screenshots below for a sense of how it works

./screenshots/jumblr-normal.png

Typing:

./screenshots/jumblr-typing.png

If you give up and ask for the solution:

./screenshots/jumblr-solve.png

Notes about the implementation:

The implementation is pretty straightforward and mostly consists of functions to find permutations and subsets of words; I’m sure this could be made much faster.

The most important aspect for game play is actually the word list: in order for the game to be fun it must know all the words you can think of, but not have too many obscure words. It turns out to be surprisingly difficult to find that balance. My approach is as follows:

  1. Take the SIL english word list and intersect it with the New Oxford English Dictionary which comes with mac osx. I then removed the three letter words which were obviously acronyms, abbreviations for longer words, or racial slurs. This is the “expert” word list and contains about 85,000 words. (source: http://www-01.sil.org/linguistics/wordlists/english/)
  2. Take the “8” word list from http://www.keithv.com/software/wlist/ and intersect it with the “expert” list. This becomes the “hard” list and contains about 47,000 words.
  3. Take the “9” word list from the above link and intersect with with the “expert” list. This is the “medium” list and contains about 36,000 words.
  4. Take the “10” word list from the above link and intersect it with the “expert” list. This contains 21,000 words and is the “easy” list.

Let me know how you find the difficulty levels – I’d really appreciate the feedback!

Installation:

Use package.el. You’ll need to add MELPA to your archives:

(require 'package)
(add-to-list 'package-archives
             '("melpa" . "https://melpa.org/packages/") t)

Alternatively, you can just save this file and do the standard

(add-to-list 'load-path "/path/to/jumblr.el")
(require 'jumblr)

Customization:

See the defvar definitions at the beginning of the source code. For example, to switch the dictionary, add the following to your .emacs:

(setq jumblr-dict-file "dict/easy.txt")

Acknowledgements

Thanks to Meredith, Brittany, Kathara, and Anna for suggesting the name jumblr!

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.