diff

package
v0.0.0-...-713b49f Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2015 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package diff provides the Diff engine for updating a game.

The job of a diff engine is to set up and maintain the connection with the dealer if one is needed, to send updates from the dealer, and to recieve Actions from players. When a game has ended, the engine will close the channel on which updates are sent. All updates should be an Action, Cards, or Players.

Index

Constants

View Source
const ACPCversion = "VERSION:2.0.0\r\n"

Variables

This section is empty.

Functions

func NewACPC

func NewACPC(addr string) (chan interface{}, chan string, error)

Types

type ACPCLog

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

func NewACPCLog

func NewACPCLog(file string) (*ACPCLog, error)

func (*ACPCLog) Replay

func (this *ACPCLog) Replay(c chan *ACPCLog)

func (*ACPCLog) String

func (this *ACPCLog) String() string

type Action

type Action string // f, c, r.

type Cards

type Cards string // AsKd

type Players

type Players struct {
	Names  []string // The names of all the players.
	Viewer int      // The offset into Names of the viewer.
}

The names of all the players in the current hand ordered by their position relative to the dealer button. If the players' names are not known, then Names will be nil.

Jump to

Keyboard shortcuts

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