refactor server-side game logic and added client-side game logic. added tests.