Exemple #1
0
 private void updateImage() {
   if (isHighlighted) {
     switch (cellValue) {
       case CellContent.PLAYER_CELL:
         if (isSelected) {
           image = ImageCache.getImage(LobberConstants.PLAYER_1_HIGHLIGHTED_LAST_SELECTED);
         } else {
           image = ImageCache.getImage(LobberConstants.PLAYER_1_HIGHLIGHTED);
         }
         break;
       case CellContent.OPPONENT_CELL:
         if (isSelected) {
           image = ImageCache.getImage(LobberConstants.PLAYER_2_HIGHLIGHTED_LAST_SELECTED);
         } else {
           image = ImageCache.getImage(LobberConstants.PLAYER_2_HIGHLIGHTED);
         }
         break;
       case CellContent.NON_FILLED_CELL:
         image = ImageCache.getImage(LobberConstants.NO_FILLED_HIGHLIGHTED);
         break;
     }
   } else {
     switch (cellValue) {
       case CellContent.PLAYER_CELL:
         if (isSelected) {
           image = ImageCache.getImage(LobberConstants.PLAYER_1_NO_HIGHLIGHT_LAST_SELECTED);
         } else {
           image = ImageCache.getImage(LobberConstants.PLAYER_1_NO_HIGHLIGHT);
         }
         break;
       case CellContent.OPPONENT_CELL:
         if (isSelected) {
           image = ImageCache.getImage(LobberConstants.PLAYER_2_NO_HIGHLIGHT_LAST_SELECTED);
         } else {
           image = ImageCache.getImage(LobberConstants.PLAYER_2_NO_HIGHLIGHT);
         }
         break;
       case CellContent.NON_FILLED_CELL:
         image = ImageCache.getImage(LobberConstants.NO_FILLED_NO_HIGHLIGHT);
         break;
     }
   }
 }
Exemple #2
0
 public LobberCell() {
   image = ImageCache.getImage(LobberConstants.NO_FILLED_NO_HIGHLIGHT);
 }