feat: initial test for release hand
This commit is contained in:
@@ -2,6 +2,7 @@ package rooms
|
||||
|
||||
import (
|
||||
"log"
|
||||
"maps"
|
||||
"slices"
|
||||
)
|
||||
|
||||
@@ -130,6 +131,22 @@ func (r *Room) gestureSearchStartIndex(gesture, curSpeakerGesture HandGesture) i
|
||||
return indexFromWhichToStart
|
||||
}
|
||||
|
||||
func (r *Room) Equal(other *Room) bool {
|
||||
if r == other {
|
||||
return true
|
||||
}
|
||||
if r.Name != other.Name || r.PasswordHash != other.PasswordHash || r.CurrentSpeaker != other.CurrentSpeaker {
|
||||
return false
|
||||
}
|
||||
if !slices.Equal(r.AdminIds, other.AdminIds) || !slices.Equal(r.Paricipants, other.Paricipants) {
|
||||
return false
|
||||
}
|
||||
if !maps.Equal(r.ParticipantHands, other.ParticipantHands) || !maps.Equal(r.Marks, other.Marks) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// sooooooo. i need hand types. are there enums in go?
|
||||
type HandGesture uint8
|
||||
|
||||
|
||||
Reference in New Issue
Block a user