Skip to content

Commit

Permalink
Added colors for two more players
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisJan00 committed Jul 30, 2011
1 parent f5859f9 commit e711ccd
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 3 deletions.
14 changes: 14 additions & 0 deletions globals.js
Expand Up @@ -55,6 +55,20 @@ G.colors = {
orangeBorderDark : "ff8c00",
orangeHighlight : "#ff5400",
orangeBackground : "#ffe9ce",

blue: "#bacfff",
blueBorder: "#2067ff",
blueBorderLight: "#4d85ff",
blueBorderDark: "#2067ff",
blueHighlight: "#004fff",
blueBackground: "#d6e3ff",

magenta: "#ffbfc7",
magentaBorder: "#ff203a",
magentaBorderLight: "#ff596d",
magentaBorderDark: "#ff203a",
magentaHighlight: "#ff0020",
magentaBackground: "#ffd9de",

grey : "#CCCCCC",
greyBorder : "#AAAAAA",
Expand Down
14 changes: 11 additions & 3 deletions legend.js
Expand Up @@ -6,6 +6,8 @@ G.Display = function() {
case -1: return G.colors.grey;
case 0: return G.colors.purple;
case 1: return G.colors.orange;
case 2: return G.colors.blue;
case 3: return G.colors.magenta;
}
}

Expand All @@ -14,14 +16,18 @@ G.Display = function() {
case -1: return G.colors.greyBorder;
case 0: return G.colors.purpleBorder;
case 1: return G.colors.orangeBorder;
case 2: return G.colors.blueBorder;
case 3: return G.colors.magentaBorder;
}
}

self.colorForPlayerBlink = function(pn) {
switch(pn) {
case -1: return G.colors.greyHighLight;
case 0: return G.colors.purpleHighLight;
case 1: return G.colors.orangeHighLight;
case -1: return G.colors.greyHighlight;
case 0: return G.colors.purpleHighlight;
case 1: return G.colors.orangeHighlight;
case 2: return G.colors.blueHighlight;
case 3: return G.colors.magentaHighlight;
}
}

Expand All @@ -30,6 +36,8 @@ G.Display = function() {
case -1: return G.colors.greyBackground;
case 0: return G.colors.purpleBackground;
case 1: return G.colors.orangeBackground;
case 2: return G.colors.blueBackground;
case 3: return G.colors.magentaBackground;
}
}

Expand Down
12 changes: 12 additions & 0 deletions piles.js
Expand Up @@ -187,12 +187,24 @@ G.initPiles = function()
G.Piles[1].cellColor = function(ind) {
return G.colors.orangeBackground;
}
G.Piles[2].cellColor = function(ind) {
return G.colors.blueBackground;
}
G.Piles[3].cellColor = function(ind) {
return G.colors.magentaBackground;
}
G.Piles[0].borderColor = function(ind) {
return ind? G.colors.purpleBorderDark : G.colors.purpleBorderLight;
}
G.Piles[1].borderColor = function(ind) {
return ind? G.colors.orangeBorderDark : G.colors.orangeBorderLight;
}
G.Piles[2].borderColor = function(ind) {
return ind? G.colors.blueBorderDark : G.colors.blueBorderLight;
}
G.Piles[3].borderColor = function(ind) {
return ind? G.colors.mangentaBorderDark : G.colors.magentaBorderLight;
}

G.Piles.chooseAll = function() {
G.Piles[0].chooseTiles();
Expand Down
4 changes: 4 additions & 0 deletions strings.js
Expand Up @@ -2,10 +2,14 @@ G.strings = {
gameTitle : "ELEMENTIS",
firstPlayerName : "purple",
secondPlayerName : "orange",
thirdPlayerName : "blue",
fourthPlayerName : "magenta",
computerPlayerName : "computer",
thinkingMessage : "thinking...",
firstVictory : "purple won!",
secondVictory : "orange won!",
thirdVictory : "blue won!",
fourthVictory : "magenta won!",
tieGame : "tie game",
fireName : "fire",
earthName : "earth",
Expand Down

0 comments on commit e711ccd

Please sign in to comment.