Fixed winning conditions and edited formatting

One of the ways to win was not included and as a result it was a bug. The formatting of the source code was also weird and needed to be fixed.