2017-10-08 22:17:53 -07:00
|
|
|
package main
|
|
|
|
|
2017-10-09 00:41:51 -07:00
|
|
|
import (
|
|
|
|
"math/rand"
|
|
|
|
"os"
|
|
|
|
"os/exec"
|
|
|
|
"time"
|
|
|
|
)
|
2017-10-08 22:17:53 -07:00
|
|
|
|
2017-10-09 00:27:09 -07:00
|
|
|
func main() {
|
2017-10-09 00:41:51 -07:00
|
|
|
initGame()
|
|
|
|
Battle(player, goblin)
|
2017-10-09 00:27:09 -07:00
|
|
|
}
|
2017-10-09 00:41:51 -07:00
|
|
|
|
|
|
|
func initGame() {
|
|
|
|
rand.Seed(time.Now().Unix())
|
|
|
|
ClearScreen()
|
|
|
|
}
|
|
|
|
|
|
|
|
func ClearScreen() {
|
|
|
|
cmd := exec.Command("clear")
|
|
|
|
cmd.Stdout = os.Stdout
|
|
|
|
cmd.Run()
|
|
|
|
}
|