25 lines
271 B
Go
25 lines
271 B
Go
package main
|
|
|
|
import (
|
|
"math/rand"
|
|
"os"
|
|
"os/exec"
|
|
"time"
|
|
)
|
|
|
|
func main() {
|
|
initGame()
|
|
Battle(player, goblin)
|
|
}
|
|
|
|
func initGame() {
|
|
rand.Seed(time.Now().Unix())
|
|
ClearScreen()
|
|
}
|
|
|
|
func ClearScreen() {
|
|
cmd := exec.Command("clear")
|
|
cmd.Stdout = os.Stdout
|
|
cmd.Run()
|
|
}
|