Constructor
(private) new Player() → {Player}
Private constructor to enforce singleton pattern
- Source:
Returns:
- Type
- Player
Methods
keyPressed(key)
responds to key press events
Parameters:
| Name | Type | Description |
|---|---|---|
key |
number | the ascii code of the keypressed |
- Source: