Skip to content

Commit

Permalink
Set the condition to no knowlegde for getting data of 2 users for ana…
Browse files Browse the repository at this point in the history
…lysis
  • Loading branch information
chiragrank committed Nov 4, 2021
1 parent 05d208d commit 157d273
Showing 1 changed file with 29 additions and 34 deletions.
63 changes: 29 additions & 34 deletions public/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,45 +221,40 @@ var gameInfoState = new Phaser.Class({
this.bottomRight = this.add.sprite(300, 303, "blankBottomRight")
this.bottomLeft = this.add.sprite(123.5, 303, "blankBottomLeft")

this.topLeft.setScale(0.3)
this.topRight.setScale(0.3)
this.bottomRight.setScale(0.3)
this.bottomLeft.setScale(0.3)

this.tl = "No knowledge";
this.tr = "No knowledge";
this.bl = "No knowledge";
this.br = "No knowledge";

if(Math.random() < .3){ // first randomization
if (Math.random() < .5){ // post accident*/
this.topLeft = this.add.sprite(123.5, 100, "rubbleTopLeft")
this.topRight = this.add.sprite(300, 100, "rubbleTopRight")
this.bottomRight = this.add.sprite(300, 303, "rubbleBottomRight")
this.bottomLeft = this.add.sprite(123.5, 303, "rubbleBottomLeft")
this.tl = "Knowledge";
this.tr = "Knowledge";
this.bl = "Knowledge";
this.br = "Knowledge";
}
}else{ // second randomization
if(Math.random() < .5){
this.topLeft = this.add.sprite(123.5, 100, "rubbleTopLeft")
this.tl = "Knowledge";
}
if(Math.random() < .5){
this.topRight = this.add.sprite(300, 100, "rubbleTopRight")
this.tr = "Knowledge";
}
if(Math.random() < .5){
this.bottomLeft = this.add.sprite(123.5, 303, "rubbleBottomLeft")
this.bl = "Knowledge";
}
if(Math.random() < .5){
this.bottomRight = this.add.sprite(300, 303, "rubbleBottomRight")
this.br = "Knowledge";
}
}
// if(Math.random() < .3){ // first randomization
// if (Math.random() < .5){ // post accident*/
// this.topLeft = this.add.sprite(123.5, 100, "rubbleTopLeft")
// this.topRight = this.add.sprite(300, 100, "rubbleTopRight")
// this.bottomRight = this.add.sprite(300, 303, "rubbleBottomRight")
// this.bottomLeft = this.add.sprite(123.5, 303, "rubbleBottomLeft")
// this.tl = "Knowledge";
// this.tr = "Knowledge";
// this.bl = "Knowledge";
// this.br = "Knowledge";
// }
// }else{ // second randomization
// if(Math.random() < .5){
// this.topLeft = this.add.sprite(123.5, 100, "rubbleTopLeft")
// this.tl = "Knowledge";
// }
// if(Math.random() < .5){
// this.topRight = this.add.sprite(300, 100, "rubbleTopRight")
// this.tr = "Knowledge";
// }
// if(Math.random() < .5){
// this.bottomLeft = this.add.sprite(123.5, 303, "rubbleBottomLeft")
// this.bl = "Knowledge";
// }
// if(Math.random() < .5){
// this.bottomRight = this.add.sprite(300, 303, "rubbleBottomRight")
// this.br = "Knowledge";
// }
// }
this.topLeft.setScale(0.3)
this.topRight.setScale(0.3)
this.bottomRight.setScale(0.3)
Expand Down

0 comments on commit 157d273

Please sign in to comment.