Skip to content

Commit

Permalink
第四关判断成功
Browse files Browse the repository at this point in the history
  • Loading branch information
zljkarry committed Sep 30, 2019
1 parent 0c509a8 commit 191df4d
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/views/fourth.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ export default {
func.initPuzzle(5);
// 随机打乱
for (var i = 0; i < 50; i++) {
var a = Math.floor(Math.random() * 25);
var b = Math.floor(Math.random() * 25);
var c = Math.floor(Math.random() * 25);
var a = Math.floor(Math.random() * 15);
var b = Math.floor(Math.random() * 15);
var c = Math.floor(Math.random() * 15);
func.move(a, b, 5);
func.move(a, c, 5);
// console.log(a, b, c);
Expand Down Expand Up @@ -167,12 +167,9 @@ export default {
}
},
successIF(a, b) {
if(!(a[0][3] === b[0][3])){
return false;
}
for (var i = 0; i < this.num; i++) {
for (var j = 5; j < this.num; j++) {
if (!(i==2&&j==4)&&!(a[i][j] === b[i][j])) {
for (var j = 0; j < this.num; j++) {
if (!(i==0&&j==1)&&!(i==0&&j==2)&&!(i==0&&j==0)&&!(i==0&&j==4)&&!(i==2&&j==4)&&!(a[i][j] === b[i][j])) {
return false;
}
}
Expand Down

0 comments on commit 191df4d

Please sign in to comment.