dice

package
v0.0.0-...-f7464b4 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2018 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dice

type Dice struct {
	Count  int
	Thrown []int
}

func (*Dice) Double

func (d *Dice) Double() bool

Double returns true if all the numbers thrown are the same

func (*Dice) Sum

func (d *Dice) Sum() int

Sum returns the sum of all the numbers from the dice Will be mainly used to determine the amount of steps you can take

func (*Dice) Throw

func (d *Dice) Throw()

Throw will generate new numbers in the Thrown slice

Jump to

Keyboard shortcuts

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