Fix: apply IE code style
This commit is contained in:
@@ -287,7 +287,7 @@ var Game = {
|
||||
this.card_selected_edge.alpha = 0;
|
||||
},
|
||||
|
||||
cardClicked(col, row) {
|
||||
cardClicked: function(col, row) {
|
||||
var index = this.getCardIndex(col, row);
|
||||
|
||||
if(this.isCardSelectEdgeActivated() == false) { // card select edge is not activated
|
||||
@@ -330,45 +330,45 @@ var Game = {
|
||||
},
|
||||
|
||||
|
||||
isSelectedBefore(col, row) {
|
||||
isSelectedBefore: function(col, row) {
|
||||
if(this.selectedCardCol == col && this.selectedCardRow == row)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
},
|
||||
|
||||
getCardIndex(col, row) {
|
||||
getCardIndex: function(col, row) {
|
||||
return index = row * DudeCard.MAX_CARD_COLUMN_NO + col;
|
||||
},
|
||||
|
||||
isFrontCard(col, row) {
|
||||
isFrontCard: function(col, row) {
|
||||
return this.cards[this.getCardIndex(col, row)].isFront();
|
||||
},
|
||||
|
||||
flipToFront(col, row) {
|
||||
flipToFront: function(col, row) {
|
||||
var index = row * DudeCard.MAX_CARD_COLUMN_NO + col;
|
||||
this.cards[this.getCardIndex(col, row)].flipToFront();
|
||||
},
|
||||
|
||||
flipToBack(col, row) {
|
||||
flipToBack: function(col, row) {
|
||||
this.cards[this.getCardIndex(col, row)].flipToBack();
|
||||
},
|
||||
|
||||
clearCards(col, row) {
|
||||
clearCards: function(col, row) {
|
||||
var index = this.getCardIndex(col, row);
|
||||
this.cards[index].hide();
|
||||
index = this.selectedCardRow * DudeCard.MAX_CARD_COLUMN_NO + this.selectedCardCol;
|
||||
this.cards[index].hide();
|
||||
},
|
||||
|
||||
resetCards(col, row) {
|
||||
resetCards: function(col, row) {
|
||||
var index = this.getCardIndex(col, row);
|
||||
this.cards[index].show(col, row);
|
||||
index = this.selectedCardRow * DudeCard.MAX_CARD_COLUMN_NO + this.selectedCardCol;
|
||||
this.cards[index].hide(this.selectedCardCol, this.selectedCardRow);
|
||||
},
|
||||
|
||||
showSelectedCard(col, row) {
|
||||
showSelectedCard: function(col, row) {
|
||||
this.isCardSelected = true;
|
||||
|
||||
var index = this.getCardIndex(col, row);
|
||||
@@ -471,7 +471,7 @@ var Game = {
|
||||
|
||||
|
||||
|
||||
setOpenCardInfo(col, row) {
|
||||
setOpenCardInfo: function(col, row) {
|
||||
var cardIndex = this.getCardIndex(col, row);
|
||||
|
||||
for(var i = 0; i < 2; i++) {
|
||||
@@ -484,7 +484,7 @@ var Game = {
|
||||
}
|
||||
},
|
||||
|
||||
resetOpenCardInfo(col, row) {
|
||||
resetOpenCardInfo: function(col, row) {
|
||||
var cardIndex = this.getCardIndex(col, row);
|
||||
|
||||
for(var i = 0; i < 2; i++) {
|
||||
@@ -495,7 +495,7 @@ var Game = {
|
||||
}
|
||||
},
|
||||
|
||||
isOpenedCard(col, row) {
|
||||
isOpenedCard: function(col, row) {
|
||||
var cardIndex = this.getCardIndex(col, row);
|
||||
for(var i = 0; i < 2; i++) {
|
||||
if(this.openCardInfoIndex[i] == cardIndex)
|
||||
|
||||
Reference in New Issue
Block a user