You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Tiago Collot 8647521af3 docs(dealapackofcards): refactor instructions, fix indentation 2 years ago
..
README.md docs(dealapackofcards): refactor instructions, fix indentation 2 years ago

README.md

dealapackofcards

Instructions

Deal a pack of 12 cards evenly between 4 players, Player 1, Player 2, Player 3 and Player 4.

Write a function DealAPackOfCards() that takes the argument, deck, as a slice of int and prints the desired output.

  • Each player must be printed in a different line.

Expected function

func DealAPackOfCards (deck []int) {

}

Usage

Here is a possible program to test your function:

package main

import "piscine"

func main() {
	deck := []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}
	piscine.DealAPackOfCards(deck)
}

And its output:

$ go run . | cat -e
Player 1: 1, 2, 3$
Player 2: 4, 5, 6$
Player 3: 7, 8, 9$
Player 4: 10, 11, 12$
$