Process player actions in server

Added logic to process player actions in server