Beispiel #1
0
func main() {
	// Parse command-line flags
	// deckPtr := flag.Bool("match", true, "a match")
	flag.Parse()
	// _gameType := *deckPtr
	args := flag.Args()
	heroDeckFile := args[0]
	opponentDeckFile := args[1]
	fmt.Println("Player File: ", heroDeckFile)
	fmt.Println("Opponent File: ", opponentDeckFile)

	ekcore.LoadCards("./ek_cards.tsv")

	// setup player deck
	hero := ekcore.Player{Name: "Merak", Level: 5}
	heroDeck := ekcore.LoadDeck(heroDeckFile)
	heroDeck.PrintDeck()

	// setup opponent deck
	opponent := ekcore.Player{Name: "EK NPC", Level: 5}
	opponentDeck := ekcore.LoadDeck(opponentDeckFile)

	if heroDeck == nil || opponentDeck == nil {
		panic("crap")
	}

	match := ekcore.NewMatch(hero, opponent, *heroDeck, *opponentDeck)
	match.Run()

}
Beispiel #2
0
func main() {
	ekcore.LoadCards("./ek_cards.tsv")

	// setup player deck
	hero := ekcore.Player{Name: "Merak", Level: 25}
	heroDeck := ekcore.LoadDeck(heroDeckFile)
	heroDeck.PrintDeck()

	// setup opponent deck
	opponent := ekcore.Player{Name: "PVP Deck", Level: 25}
	opponentDeck := ekcore.LoadDeck(opponentDeckFile)

	if heroDeck == nil || opponentDeck == nil {
		panic("crap")
	}

	match := ekcore.NewMatch(hero, opponent, *heroDeck, *opponentDeck)
	match.Run()

}