added test skeletons
Added checking for victory
Refactored