Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Commit

Permalink
ready to solve
Browse files Browse the repository at this point in the history
  • Loading branch information
tlonist committed Nov 8, 2022
1 parent 25ba5aa commit ad95771
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions src/wordle/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,8 @@
answer : [`p` `o` `w` `e` `r`]
input과 answer가 완벽히 일치하면 아래의 코드를 실행.
(dispatch [::events/update-status :solved])"
[input answer]
#_(let [correct-letters (map = input answer)]
(cond
(every? true? correct-letters)
(dispatch [::events/update-status :solved]))))
[input answer])


(defn wordle-match?
"input : [`w` `a` `t` `e` `r`]
Expand All @@ -34,17 +31,7 @@
포함하지만 같은 위치가 아닌 경우 -> :contain
포함하고 위치가 같은 경우 -> :correct
포함하지 않는 경우 -> :none"
[input answer]
#_(let [answer-set (set answer)]
(->> input
(map (fn [c c']
(cond
(= c c')
:correct
(contains? answer-set c')
:contain
:else
:none)) answer))))
[input answer])

(defn key-up-event [e]
(let [curr (re-frame/subscribe [::subs/curr])
Expand Down

0 comments on commit ad95771

Please sign in to comment.