Class PlayerColorGenerator

Hierarchy

  • PlayerColorGenerator

Index

Methods

getFromHash

  • getFromHash(hash: Buffer): string
  • Create a player color using the supplied hash buffer.

    Parameters

    • hash: Buffer

      Generates a name from the supplied buffer which should contain a 32 byte hash of (such as SHA 256) of player's identity.

    Returns string

getFromId

  • getFromId(id: string | number): string

getRandom

  • getRandom(): string
Brought to you with ❤ by the Alexa Games team at Amazon. © 2019, Amazon.com, Inc. or its affiliates. All Rights Reserved.