tron

package
v0.0.0-...-a6de763 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2015 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Board

type Board [][]ID

Board represents a board in a game. Each player has a board, which are used to send board deltas.

func NewBoard

func NewBoard(width, height uint8) (Board, error)

NewBoard returns an initialized Board.

type Direction

type Direction byte

type Game

type Game struct {
	// contains filtered or unexported fields
}

func NewGame

func NewGame(port, width, height, maxplayers, maxdeaths int, speed, delay time.Duration) (*Game, error)

NewGame returns an initialized Game according to the input arguments. The main() function should call the Play() method on this Game.

func (*Game) Play

func (g *Game) Play()

type ID

type ID uint16

type Player

type Player struct {
	// contains filtered or unexported fields
}

A Player represents a live TCP connection from a client

func NewPlayer

func NewPlayer(id ID, name string, conn ssh.Channel) *Player

NewPlayer returns an initialized Player.

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(port int, idPool <-chan ID) (*Server, error)

Jump to

Keyboard shortcuts

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