Added winning and pass conditions, some refactoring