// for moving in game public void MoveTo(Square location) { if(this.location != null) this.location.SetOccupant(null); this.location = location; location.SetOccupant(this); animation.Position = location.Position(); }
// for setting initial position public void SetLocation(Square location) { if(this.location != null) this.location.SetOccupant(null); this.location = location; location.SetOccupant(this); }