Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • B bjgf
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 127
    • Issues 127
    • List
    • Boards
    • Service Desk
    • Milestones
  • Jira
    • Jira
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • BlueJ
  • bjgf
  • Issues
  • #1474
Closed
Open
Issue created Apr 06, 2008 by Neil Brown@nccbMaintainer

[GREENFOOT-130] add isInsideWorld method to World class api

isInsideWorld returns true if the given x and y location is inside the world and false if not. I find myself often needing this, say to check if an Actor is moving itself outside the World and so should remove itself.

Something like: {noformat} public boolean isInsideWorld(int x, int y) { return x >= 0 && x < getWidth() && y >= 0 && y < getHeight(); } {noformat}


Issue metadata

  • Issue type: Task
  • Priority: Lowest
  • Fix versions: 3.0.0
Assignee
Assign to
Time tracking