flowchart TB
    checkColor[On CheckColor] --> alreadyExists
    alreadyExists[Is there already a player with that color?]

    alreadyExists -- Try the next color --> loop
    alreadyExists -- No --> send

    loop[Is there already a player with that color?]

    loop -- No --> send
    loop -- Yes --> tryTheNextColor
    tryTheNextColor[Try the next color] --> loop

    send[Set the player's color using `SetColor`]
