You can tack, but usually you can't do it just with the rudder. As you are turning towards the wind, keep the topsail braced up (and loosen the headsails). You need to be able to turn far enough into the wind for the topsail to be aback. After that the wind blowing on the topsail should, hopefully, be enough to push you around the rest of the way; you might come to a stop, or be making sternway, but you should eventually go round through the wind.
Edit: the tutorial level, getting out of harbour, is practice for this.
Edit: the tutorial level, getting out of harbour, is practice for this.