examples

package
v0.0.0-...-82b3e0f Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2014 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
y or Y : Canonical URL