mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-07 06:12:43 +08:00
- 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
32 lines
629 B
Go
32 lines
629 B
Go
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)
|
|
}
|
|
}
|