. "Final judgment.On trial, the court shall adjudge the property to the plaintiff, or to the defendant, as the law and facts warrant, together with such damages and costs as either party establishes a right to recover." . . . .