Fixed a bug with horizontal win detection; added vertical win detection