crowns/game_test.go

20 lines
332 B
Go

package main
import (
"math/rand"
"testing"
"github.com/stretchr/testify/assert"
)
func TestPlayRound(t *testing.T) {
entropy := rand.New(rand.NewSource(0xdeadbeef))
rr := NewRound(5, 4, entropy)
nextPlayer, scores := rr.Play(0)
assert.EqualValues(t, 0, nextPlayer)
assert.EqualValues(t, []int{0, 28, 6, 6}, scores)
}