Beispiel #1
0
func (entity *Entity) GetExchangeReturnChoices(log *log.Entity, playerNames []string, coinInfo map[string]int, faceupInfo map[string][]int, deck *deck.Entity) (int, int) {
	choice1 := rand.Intn(deck.Size())
	var choice2 int
	for choice2 == choice1 {
		choice2 = rand.Intn(deck.Size())
	}
	return deck.Cards()[choice1], deck.Cards()[choice2]
}
Beispiel #2
0
func printPersonalTable(currentPlayerName string, playerNames []string, coinInfo map[string]int, faceupInfo map[string][]int, deck *deck.Entity) {
	fmt.Println("Player Name: " + currentPlayerName)
	fmt.Print("Your secret cards: ")
	for i := range deck.Cards() {
		fmt.Print(deck.Cards()[i])
	}
	fmt.Println()
	for i := range playerNames {
		fmt.Printf("%s: %d%d - %d coins\n", playerNames[i], faceupInfo[playerNames[i]][0], faceupInfo[playerNames[i]][1], coinInfo[playerNames[i]])
	}
}