Fix: apply IE code style

This commit is contained in:
2018-10-25 12:28:10 +09:00
parent 52272d0ae5
commit 60d89224e7
+12 -12
View File
@@ -287,7 +287,7 @@ var Game = {
this.card_selected_edge.alpha = 0; this.card_selected_edge.alpha = 0;
}, },
cardClicked(col, row) { cardClicked: function(col, row) {
var index = this.getCardIndex(col, row); var index = this.getCardIndex(col, row);
if(this.isCardSelectEdgeActivated() == false) { // card select edge is not activated 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) if(this.selectedCardCol == col && this.selectedCardRow == row)
return true; return true;
return false; return false;
}, },
getCardIndex(col, row) { getCardIndex: function(col, row) {
return index = row * DudeCard.MAX_CARD_COLUMN_NO + col; return index = row * DudeCard.MAX_CARD_COLUMN_NO + col;
}, },
isFrontCard(col, row) { isFrontCard: function(col, row) {
return this.cards[this.getCardIndex(col, row)].isFront(); return this.cards[this.getCardIndex(col, row)].isFront();
}, },
flipToFront(col, row) { flipToFront: function(col, row) {
var index = row * DudeCard.MAX_CARD_COLUMN_NO + col; var index = row * DudeCard.MAX_CARD_COLUMN_NO + col;
this.cards[this.getCardIndex(col, row)].flipToFront(); this.cards[this.getCardIndex(col, row)].flipToFront();
}, },
flipToBack(col, row) { flipToBack: function(col, row) {
this.cards[this.getCardIndex(col, row)].flipToBack(); this.cards[this.getCardIndex(col, row)].flipToBack();
}, },
clearCards(col, row) { clearCards: function(col, row) {
var index = this.getCardIndex(col, row); var index = this.getCardIndex(col, row);
this.cards[index].hide(); this.cards[index].hide();
index = this.selectedCardRow * DudeCard.MAX_CARD_COLUMN_NO + this.selectedCardCol; index = this.selectedCardRow * DudeCard.MAX_CARD_COLUMN_NO + this.selectedCardCol;
this.cards[index].hide(); this.cards[index].hide();
}, },
resetCards(col, row) { resetCards: function(col, row) {
var index = this.getCardIndex(col, row); var index = this.getCardIndex(col, row);
this.cards[index].show(col, row); this.cards[index].show(col, row);
index = this.selectedCardRow * DudeCard.MAX_CARD_COLUMN_NO + this.selectedCardCol; index = this.selectedCardRow * DudeCard.MAX_CARD_COLUMN_NO + this.selectedCardCol;
this.cards[index].hide(this.selectedCardCol, this.selectedCardRow); this.cards[index].hide(this.selectedCardCol, this.selectedCardRow);
}, },
showSelectedCard(col, row) { showSelectedCard: function(col, row) {
this.isCardSelected = true; this.isCardSelected = true;
var index = this.getCardIndex(col, row); 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); var cardIndex = this.getCardIndex(col, row);
for(var i = 0; i < 2; i++) { 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); var cardIndex = this.getCardIndex(col, row);
for(var i = 0; i < 2; i++) { 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); var cardIndex = this.getCardIndex(col, row);
for(var i = 0; i < 2; i++) { for(var i = 0; i < 2; i++) {
if(this.openCardInfoIndex[i] == cardIndex) if(this.openCardInfoIndex[i] == cardIndex)