Added cp logic & gameover logic