Giter Club home page Giter Club logo

jumblr's People

Contributors

mkmcc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

jumblr's Issues

Feature request: briefly flash newly guessed word in different color

Great game, thanks for writing it!

When playing with a large list of words, I have a hard time telling if I've guessed a new word or simply retyped I word I already had. It would help to have a newly guessed word appear in a different color. I guess strictly speaking knowing I really got a new word is unnecessary, but it's reassuring.

Here's a very hacky way to implement the change: when a correct guess is made, instead of putting (word t) in the data structure, mark it differently, say as (word new), then when drawing that entry use a different face and change the symbol new to t so on the next redrawing it will appear in jlr-correct-face. Here's a diff:

diff -c your-jumblr.el modified-jumblr.el
*** your-jumblr.el      2015-01-09 11:15:37.899773390 -0500
--- modified-jumblr.el  2015-01-09 11:00:49.907370068 -0500
***************
*** 130,135 ****
--- 130,136 ----
  ;;; faces
  (make-face 'jlr-scrable-face)
  (make-face 'jlr-correct-face)
+ (make-face 'jlr-flash-face)
  (make-face 'jlr-cheat-face)
  (make-face 'jlr-blank-face)
  (make-face 'jlr-guess-face)
***************
*** 140,145 ****
--- 141,152 ----
                      :foreground "#859900"
                      :height 1.5)

+ (set-face-attribute 'jlr-flash-face nil
+                     :inherit 'fixed-pitch
+                     :weight 'bold
+                     :foreground "#008599"
+                     :height 1.5)
+ 
  (set-face-attribute 'jlr-blank-face nil
                      :inherit 'fixed-pitch
                      :height 1.5)
***************
*** 375,380 ****
--- 382,390 ----
        (cond
         ((equal -1 status)
          (propertize output 'face 'jlr-cheat-face))
+        ((equal 'new status)
+         (setcdr elt '(t))
+         (propertize output 'face 'jlr-flash-face))
         (status
          (propertize output 'face 'jlr-correct-face))
         (t
***************
*** 428,434 ****
      (when (-contains? data try)
        (let ((ind (-elem-index try data)))
          (setq data (remove try data))
!         (setq data (-insert-at ind (list word t) data))))
      (setq jlr-game-data
            (list (list (jlr-scramble-word scr) "")
                  data))))
--- 438,444 ----
      (when (-contains? data try)
        (let ((ind (-elem-index try data)))
          (setq data (remove try data))
!         (setq data (-insert-at ind (list word 'new) data))))
      (setq jlr-game-data
            (list (list (jlr-scramble-word scr) "")
                  data))))

Diff finished.  Fri Jan  9 11:16:45 2015

This seems very undisciplined and I'm sure if you wanted to implement this feature you'd find a better way to do it.

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.