Implemented below mentioned changes :

1. Added delay of 2-3 seconds for incorrect match.
2. Added function emptyGrid to remove all inner nodes.