mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-31 21:39:41 +08:00
feat: add LianLianKan (连连看) game bot implementation
- Add complete LianLianKan game bot with AI-powered interface analysis - Implement static analysis solver with 0-2 turn connection algorithms - Support cross-platform game automation (Android, iOS, HarmonyOS, Browser) - Include comprehensive test suite with real game data - Add command line tool and documentation - Integrate with HttpRunner @/uixt module and Doubao AI models
This commit is contained in:
31
examples/game/llk/cmd/main.go
Normal file
31
examples/game/llk/cmd/main.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
hrp "github.com/httprunner/httprunner/v5"
|
||||
"github.com/httprunner/httprunner/v5/examples/game/llk"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
func main() {
|
||||
hrp.InitLogger("INFO", false, false)
|
||||
|
||||
// Create game bot with real device
|
||||
bot, err := llk.NewLLKGameBot("android", "")
|
||||
if err != nil {
|
||||
log.Fatal().Err(err).Msg("Failed to create game bot")
|
||||
}
|
||||
defer bot.Close()
|
||||
|
||||
// err = bot.EnterGame(context.Background())
|
||||
// require.NoError(t, err, "Failed to enter game")
|
||||
|
||||
for {
|
||||
err = bot.Play()
|
||||
if err != nil {
|
||||
log.Fatal().Err(err).Msg("Failed to play game")
|
||||
}
|
||||
time.Sleep(1 * time.Second)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user