boardgameio / boardgame.io

State Management and Multiplayer Networking for Turn-Based Games
https://boardgame.io
MIT License
10.04k stars 709 forks source link

[refactor] lift transport selection from _ClientImpl #418

Closed amitport closed 5 years ago

amitport commented 5 years ago

following a discussion on gitter:

We should extract transport selection logic from raw _ClientImpl. instead it should just receive transportFactory (or a more abstract masterFactory) as a parameter.

Ideally _ClientImpl would be very slim and multiplayer/local/ai selection logic would be extracted. This separation of concerns will simplify the client interface and will allow for better bundling (e.g., avoid bundling SockeIO when it is not used).

open for contribution- if somebody starts working on it please write here to avoid collisions

(should probably wait until https://github.com/nicolodavis/boardgame.io/tree/phases-overhaul is merged)

amitport commented 5 years ago

working on this