Open matthewharwood opened 7 years ago
RawkStar: that fromEvent creates a stream of inputs RawkStar: and I make a sliding window of a buffer of 11 and it emits after 11 every key stroke RawkStar: I can subscribe to that emittion and loop through the keys. "every" will return a boolean if the inner function is true for all cases RawkStar: loop through all the keyEvents** RawkStar: but that litterally is a one off RawkStar: and doesnt account for time RawkStar: the prob is that konami[i] RawkStar: that needs to not be an array of values, nor a table/map of key values RawkStar: but rather a single tree that it traverses
This is called a LinkedHashMap
from "what if the konami code could change my website" to "what if I had a bunch of combos" to "what if all user input flow'd through the same function/service