Refactoring the server with the new server-client comunication sequence. (still missing the function sendDiceValue)