Shared part of game logic on server and client

96 Views Asked by At

I am creating online collection card game. I have game logic on my server. But this part of code contains concepts which need on server and client. For example HexVector, HexSlot, some enums etc. Player can click on game field and I have to send position(HexVector) from client to server.

Where do I need to store HexVector? Should I create shared project in submodule for server and client which will contains only things like HexVector, or I need to have game logic submodule in server and client? Client will be use only the things it need and server will be use all game logic.

1

There are 1 best solutions below

1
Виктор Титов On

Never belive player. You don't know how he can use this part of code. So I decide to separate common game logic in separated submodule.