srv

package
v0.0.0-...-f64dbd0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DumpSize = 3
	// MaxPlayers is the number of people who can join a single game. Since we
	// scale up the number of tiles, this is mostly a DoS prevention thing.
	MaxPlayers = 24
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func New

func New(r *rand.Rand, auth *auth.Client, db banana.DB, dict banana.Dictionary) (*Server, error)

func (*Server) Dump

func (s *Server) Dump(ctx context.Context, req *pb.DumpRequest) (*pb.DumpResponse, error)

Dump exchanges a player's letter for three from the bunch

func (*Server) JoinGame

func (s *Server) JoinGame(req *pb.JoinGameRequest, stream pb.BananaService_JoinGameServer) error

func (*Server) ListGames

func (s *Server) ListGames(ctx context.Context, req *pb.ListGamesRequest) (*pb.ListGamesResponse, error)

func (*Server) NewGame

func (s *Server) NewGame(ctx context.Context, req *pb.NewGameRequest) (*pb.NewGameResponse, error)

func (*Server) Register

func (s *Server) Register(ctx context.Context, req *pb.RegisterRequest) (*pb.RegisterResponse, error)

func (*Server) Spectate

func (s *Server) Spectate(req *pb.SpectateRequest, stream pb.BananaService_SpectateServer) error

func (*Server) StartGame

func (s *Server) StartGame(ctx context.Context, req *pb.StartGameRequest) (*pb.StartGameResponse, error)

func (*Server) StreamGames

func (s *Server) StreamGames(req *pb.ListGamesRequest, stream pb.BananaService_StreamGamesServer) error

func (*Server) StreamLogs

func (s *Server) StreamLogs(req *pb.StreamLogsRequest, stream pb.BananaService_StreamLogsServer) error

func (*Server) UpdateBoard

func (s *Server) UpdateBoard(ctx context.Context, req *pb.UpdateBoardRequest) (*pb.UpdateBoardResponse, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL