examples

package
Version: v0.0.0-...-68c2220 Latest Latest
Warning

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

Go to latest
Published: May 18, 2015 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package examples contains, well, examples of how to use goconvey to specify behavior of a system under test. It contains a well-known example by Robert C. Martin called "Bowling Game Kata" as well as another very trivial example that demonstrates Reset() and some of the assertions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Game

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

Game contains the state of a bowling game.

func NewGame

func NewGame() *Game

NewGame allocates and starts a new game of bowling.

func (*Game) Roll

func (self *Game) Roll(pins int)

Roll rolls the ball and knocks down the number of pins specified by pins.

func (*Game) Score

func (self *Game) Score() (sum int)

Score calculates and returns the player's current score.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL