My first attempt at creating an multiplayer game with a authoritative server. This is the model logic part.