Refactored main() function: added init(), checkWin() & checkLose()
Refactored main() function: added init(), checkWin() & checkLose(). Fixes #5
Merge pull request #5 from praba230890/master

Refactored main() function: added init(), checkWin() & checkLose().