refactored win checking into a single method that takes a mark argument