the app runs properly unless and until the number generated by the computer consists of a repeating digit. (Say 277) and we guess 447 then it shows us 1 cow and 0 bulls whereas it should show us 1 bull and 0 cows.
the fix to the repeated number problem was finally found using a ques on Stack Overdflow. The game works now. Just the key bindings for different functions are remaining to be added.