package main
import (
"fmt"
"github.com/skiesel/netlogo"
)
func main() {
// Create a new NetLogo world with a specified width and height
world := netlogo.NewWorldWithDims(10, 10)
// Create a new agent (turtle) at coordinates (5, 5) in the world
turtle := world.CreateTurtleAt(5, 5)
// Set the turtle's shape to "person" and color to red
turtle.SetShape("person")
turtle.SetColor("red")
// Create walls in the world to represent boundaries
world.CreateWall(0, 0, 10, 0)
world.CreateWall(0, 0, 0, 10)
world.CreateWall(10, 0, 10, 10)
world.CreateWall(0, 10, 10, 10)
// Move the turtle forward by 3 steps
turtle.Forward(3)
// Check if the turtle is inside the world boundaries
if !turtle.InWorld() {
fmt.Println("Turtle is outside the world boundaries.")
}
// Display the current state of the world
world.DisplayOnConsole()
}