stuff

package
v0.0.0-...-43994b6 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFrontpage

func CreateFrontpage()

CreateFrontpage is

Types

type BattleShips

type BattleShips struct {
	sync.Mutex

	ID string
	// contains filtered or unexported fields
}

func (*BattleShips) BothReady

func (g *BattleShips) BothReady() bool

BothReady returns true when both player are true

func (*BattleShips) MakeMove

func (g *BattleShips) MakeMove(player string, point boardPoint) gameResponse

MakeMove is used to

func (*BattleShips) OtherPlayer

func (g *BattleShips) OtherPlayer(player string) string

OtherPlayer returns the other player thean the given player

func (*BattleShips) PlayerReady

func (g *BattleShips) PlayerReady(player string, sp shipPlacement) gameResponse

PlayerReady is

func (*BattleShips) StartGame

func (g *BattleShips) StartGame(player string)

StartGame sets the turn to the current player

type Server

type Server struct {
	Key []byte

	Server *socketio.Server

	Queue []string
	// contains filtered or unexported fields
}

func (*Server) DisconnectHandler

func (server *Server) DisconnectHandler(s socketio.Conn, msg string)

DisconnectHandler is

func (*Server) Init

func (server *Server) Init()

Init is used to start everything

Jump to

Keyboard shortcuts

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