Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PongClient ¶
type PongClient struct { Conn *grpc.ClientConn Context context.Context PongerService pb.PongerClient // contains filtered or unexported fields }
func (*PongClient) GetBallPosition ¶
func (pc *PongClient) GetBallPosition() (int, int, error)
GetBallPosition retrieve the ball position from the server we expect then the client to correct its own state if needed
func (*PongClient) GetOpponent ¶
GetOpponent get opponent position client will update its state from this
func (*PongClient) GetScore ¶
func (pc *PongClient) GetScore(g *pong.Game)
func (*PongClient) Identify ¶
func (pc *PongClient) Identify() int32
Identify the client we retrieve the Handshake used for further discussion with the server. We return the assigned player number (by the server)
func (*PongClient) SendPlayerPosition ¶
SendPlayerPosition send the current position of the player passed as parameter to the server
Click to show internal directories.
Click to hide internal directories.