⚙️ method Game.ObjectAtPos(...)

Last updated:4/16/2026

URL

https://github.com/42core-team/monorepo/blob/dev/bots/go/client_lib/game/game.go

Description

Get any object based on its position.

Signature

func (g *Game) ObjectAtPos(pos Position) *Object

Parameters

  • pos Position: The position of the object the function should get

Return

  • *Object: The object at the position or nil if no such object exists.

Examples

func isPosEmpty(g *game.Game, pos game.Position) bool {
	return g.ObjectAtPos(pos) == nil
}