add webmock
set random code when creating a player with invalid code
extract websocket connection creation in Server class