30 lines
402 B
Go
30 lines
402 B
Go
package wordle
|
|
|
|
import "gitea.konchin.com/ytshih/inp2025/game/types"
|
|
|
|
type Operation struct {
|
|
}
|
|
|
|
type Handlers struct {
|
|
state WordleState
|
|
opCh chan Operation
|
|
subs []chan types.WordleState
|
|
}
|
|
|
|
func NewHandlers() *Handlers {
|
|
ret := &Handlers{subs: nil}
|
|
go ret.GameFlow()
|
|
return ret
|
|
}
|
|
|
|
func (self *Handlers) GameFlow() {
|
|
for {
|
|
select {
|
|
case op := <-self.opCh:
|
|
if opCh.Type {
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|