Implemented logic to determine if player won the game

Signed-off-by: agarwalashish <ashish-agarwal@hotmail.com>