implemented methods for determining the winning lines