package main

import (
	"fmt"
	"os"
)

func calculateActions(state *GameState, identity *Identity) Actions {
	actions := Actions{}
	if state.View == nil {
		return actions
	}
	for _, worker := range state.View.Units {
		if worker.TeamID != identity.TeamID {
			continue
		}
		// Write your strategy here.
		actions[worker.UnitID] = Action{Type: "pass"}
	}
	return actions
}

func main() {
	client, err := NewBotClient()
	if err == nil {
		err = client.Run("lpc2026", calculateActions)
	}
	if err != nil {
		fmt.Fprintln(os.Stderr, err)
		os.Exit(1)
	}
}
