flag = false; } }
if(count==2&&flag==true) {
if(str==create_str) {
tf.setText(\不错嘛,第二次就猜中了!\ count++; flag = false; } else { count++;
if(temp_aa1==temp_bb1) { x++; }
- 25 -
if(temp_aa2==temp_bb2) { x++; }
if(temp_aa3==temp_bb3) { x++; }
if(temp_aa4==temp_bb4) { x++; }
if(((create_str.indexOf(temp_str_aa1))!=-1)&&(temp_aa1!=temp_bb1)) { y++; }
- 26 -
if(((create_str.indexOf(temp_str_aa2))!=-1)&&(temp_aa2!=temp_bb2)) { y++; }
if(((create_str.indexOf(temp_str_aa3))!=-1)&&(temp_aa3!=temp_bb3)) { y++; }
if(((create_str.indexOf(temp_str_aa4))!=-1)&&(temp_aa4!=temp_bb4)) { y++; }
- 27 -
if(x==4) {
tf.setText(\恭喜你,终于答对了呵呵\ } else {
tf.setText(\没关系,还有两次机会,继续!\猜中了\位置换错了\ } x = 0; y = 0; flag = false; } }
if(count==3&&flag==true) {
if(str==create_str) {
- 28 -
相关推荐: