public void setPosition(Point position) {
    int x, y;
    // Make sure the position is a legal position(not to far to the sides so view space is given away)
    if (position.x < this.viewWidth / 2) {
      x = (int) Math.ceil(this.viewWidth / 2.0);
    } else if (position.x > (this.plan.getWidth() - (int) Math.ceil(this.viewWidth / 2.0))) {
      x = this.plan.getWidth() - (int) Math.ceil(this.viewWidth / 2.0);
    } else {
      x = position.x;
    }
    if (position.y < this.viewHeight / 2) {
      y = (int) Math.ceil(this.viewHeight / 2.0);
    } else if (position.y > (this.plan.getHeight() - (int) Math.ceil(this.viewHeight / 2.0))) {
      y = this.plan.getHeight() - (int) Math.ceil(this.viewHeight / 2.0);
    } else {
      y = position.y;
    }
    this.position = new Point(x, y);
  }