Access Granted JS "Classified" (Encapsulated)
A diversion brought to you by Nicholas D. Horne
Crack a PIN knowing the digits that the PIN comprises
Can you actually crack a four-digit PIN on your first attempt as seen in the movies on a telltale worn keypad? The "worn" keys contained in the PIN have been highlighted on the keypad. PINs are four digits in length. Digits may be repeated resulting in PINs with less than four keys being highlighted. PINs may begin with zero. Input is accepted by way of both mouse primary button and keyboard number keys.
This new but not necessarily improved implementation of Access Granted JS leverages ECMAScript 6 classes to encapsulate data and behaviors together inside a single self-contained unit more often referred to as an instance in a bid to manage complexity through the constructs afforded by object oriented programming.
GNU GPLv3 licensed source code available at https://github.com/ndhorne/access-granted-js-oop-classes