Passcodes Documentation
beep8.Passcodes.checkCode(id, code)
Function to check if a given code is valid for a given id.
Parameters
- id (string): The id to check the code for.
- code (string): The code to check.
Returns
- (boolean): True if the code is valid, false otherwise.
beep8.Passcodes.getCode(id)
Function to generate a passcode for a given id. This is intended for level passcodes.
Parameters
- id (string): The id to generate a code for.
Returns
- (string): The generated code.
beep8.Passcodes.getId(code)
Function to work out the id from the code.
Parameters
- code (string): The code to get the id for.
Returns
- (int): The id for the code.
beep8.Passcodes.input() async
Display a dialog to accept a passcode. This is automatically centered on the screen.
The level id of the specified passcode is returned as an integer.
This can be coloured with the standard beep8.color function.
Returns
-
(*number null*): The level id of the passcode.