game

package
v0.0.0-...-ddaadf8 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	START = "start" //游戏开始
)

Functions

This section is empty.

Types

type Card

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

type CardType

type CardType int

type Cards

type Cards []Card

func NewCards

func NewCards() Cards

func (Cards) Compare

func (c Cards) Compare(cards Cards) bool

func (Cards) Copy

func (c Cards) Copy() Cards

func (Cards) Len

func (c Cards) Len() int

func (Cards) Less

func (c Cards) Less(i, j int) bool

func (Cards) Resolve

func (c Cards) Resolve() (Cards, Cards, Cards, Cards)

func (Cards) Shuffle

func (c Cards) Shuffle() Cards

洗牌

func (Cards) Swap

func (c Cards) Swap(i, j int)

type Context

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

func (*Context) Ready

func (ctx *Context) Ready()

func (*Context) UnReady

func (ctx *Context) UnReady()

type Game

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

func NewGame

func NewGame(roomId int) *Game

func (*Game) Join

func (g *Game) Join(ctx *Context) error

func (*Game) Turn

func (g *Game) Turn(ctx *Context, cards Cards)

type PushServer

type PushServer struct{}

推送服务器

func (*PushServer) Fetch

type Server

type Server struct{}

游戏逻辑服务器

func (*Server) Request

Jump to

Keyboard shortcuts

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