Exemplo n.º 1
0
func initial() (*state.Universe, *rand.Rand, *state.Factor) {
	u := state.NewUniverse()
	r := rand.New(rand.NewSource(0))
	f := u.AddFactor("a-factor", "a", []string{"a", "b", "c"})

	return u, r, f
}
Exemplo n.º 2
0
// Reads the text file and starts the process
func ParseFile(filename string) *state.Universe {
	f, err := os.Open(filename)
	file_reader = bufio.NewReader(f)
	if err != nil {
		return nil
	}

	defer f.Close()

	u = state.NewUniverse()

	current_token = GetNextToken()
	AllFile()
	return u
}
Exemplo n.º 3
0
func Test_NewUniverse(t *testing.T) {
	state.NewUniverse()
}