Lawyers are also required not to mislead the court, which means the lawyer would then have to contact the judge and/or opposing lawyer and give the case up immediately. It wouldn't be ethical to argue the case as if hoping to win while intending to lose.