Exemplo n.º 1
0
func main() {
	cgreader.RunInteractivePrograms(
		"<input_file>",
		"<program_files>",
		true,
		Initialize,
		Update)
}
Exemplo n.º 2
0
func main() {
	cgreader.RunInteractivePrograms(
		"kirk",
		cgreader.GetFileList("../../input/kirk_%d.txt", 6),
		false,
		Initialize,
		Update)
}
Exemplo n.º 3
0
func main() {
	cgreader.RunInteractivePrograms(
		"ragnarok",
		cgreader.GetFileList("../../input/ragnarok_%d.txt", 4),
		true,
		Initialize,
		Update)
}
Exemplo n.º 4
0
func main() {
	cgreader.RunInteractivePrograms(
		"ragnarok_giants",
		[]string{
			"../../input/ragnarok_giants_1.txt",
			"../../input/ragnarok_giants_2.txt",
			"../../input/ragnarok_giants_3.txt",
			"../../input/ragnarok_giants_4.txt",
			"../../input/ragnarok_giants_5.txt",
			"../../input/ragnarok_giants_6.txt",
			"../../input/ragnarok_giants_7.txt",
			"../../input/ragnarok_giants_8.txt",
			"../../input/ragnarok_giants_9.txt",
			"../../input/ragnarok_giants_10.txt"},
		false, Initialize, Update)
}
Exemplo n.º 5
0
func CreateAndRunInteractivePrograms(programFile []byte, programType string, programInputFiles []string) {
	if initial, update, result := ParseInteractiveProgram(programFile); result {
		initialFunction, updateFunction := CreateInteractiveFunctions(initial, update)
		cgreader.RunInteractivePrograms(programType, programInputFiles, isVerbose, initialFunction, updateFunction)
	}
}