|
|
@ -442,7 +442,9 @@ func printProgressScreen(redisClient *redis.Client, username string) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func runGame(username, timestamp string) { |
|
|
|
func runGame(username, timestamp string) { |
|
|
|
nhCommand := fmt.Sprintf("nethack -d %s -u %s\n", config.NethackLauncher.HackDir, username) |
|
|
|
// put together users home dir
|
|
|
|
|
|
|
|
homeDir := fmt.Sprintf("%s/user/%s/", config.NethackLauncher.HackDir, username) |
|
|
|
|
|
|
|
nhCommand := fmt.Sprintf("HOME=%s nethack -d %s -u %s\n", homeDir, config.NethackLauncher.HackDir, username) |
|
|
|
ttyrecPath := fmt.Sprintf("%s/user/%s/ttyrec/%s.ttyrec", config.NethackLauncher.HackDir, username, timestamp) |
|
|
|
ttyrecPath := fmt.Sprintf("%s/user/%s/ttyrec/%s.ttyrec", config.NethackLauncher.HackDir, username, timestamp) |
|
|
|
exec.Command("stty", "-F", "/dev/tty", "echo", "-cbreak").Run() |
|
|
|
exec.Command("stty", "-F", "/dev/tty", "echo", "-cbreak").Run() |
|
|
|
clearScreen() |
|
|
|
clearScreen() |
|
|
|