crowns/game_test.go

20 lines
332 B
Go
Raw Normal View History

2024-01-07 00:09:47 +00:00
package main
import (
"math/rand"
2024-01-07 00:09:47 +00:00
"testing"
"github.com/stretchr/testify/assert"
2024-01-07 00:09:47 +00:00
)
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)
2024-01-07 00:09:47 +00:00
}