Economy-maximizing bot that prioritizes energy collection and spawning while avoiding combat entirely. Seeks nearest uncontested energy via BFS, flees enemies within 3 cells, avoids contested energy tiles, and stays near active cores for maximum spawn throughput. Includes 12 unit tests. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
19 lines
272 B
Docker
19 lines
272 B
Docker
FROM golang:1.22-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
COPY go.mod .
|
|
COPY main.go grid.go strategy.go .
|
|
|
|
RUN CGO_ENABLED=0 go build -o farmer .
|
|
|
|
FROM alpine:3.21
|
|
|
|
WORKDIR /app
|
|
COPY --from=builder /app/farmer .
|
|
|
|
ENV BOT_PORT=8080
|
|
ENV BOT_SECRET=""
|
|
|
|
EXPOSE 8080
|
|
|
|
CMD ["./farmer"]
|