/[enigma]/enigma/src/stones_complex.cc
ViewVC logotype

Diff of /enigma/src/stones_complex.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.44 by dheck, Tue Sep 9 19:17:04 2003 UTC revision 1.45 by dheck, Fri Sep 12 21:53:24 2003 UTC
# Line 2263  namespace Line 2263  namespace
2263    
2264          display::Model *model_bak;          display::Model *model_bak;
2265    
2266            static bool blinking(OxydStone *a) {
2267                return (a->state==BLINKING);
2268            }
2269          static bool blinking_or_opening(OxydStone *a) {          static bool blinking_or_opening(OxydStone *a) {
2270              return (a->state==BLINKING || a->state==OPENING);              return (a->state==BLINKING || a->state == OPENING);
2271          }          }
2272          static bool not_open(OxydStone *a) {          static bool not_open(OxydStone *a) {
2273              return !(a->state==OPEN || a->state==OPENING);              return !(a->state==OPEN || a->state==OPENING);
# Line 2417  OxydStone::maybe_open_stone() Line 2420  OxydStone::maybe_open_stone()
2420          i=find_if(instances.begin(), instances.end(), blinking_or_opening);          i=find_if(instances.begin(), instances.end(), blinking_or_opening);
2421    
2422          if (i != instances.end()) {          if (i != instances.end()) {
2423              // If colors match, open both stones. Close one of them              // If colors match and stone (*i) is alredy blinking, open
2424              // otherwise              // both stones. Close one of them otherwise
2425              if (mycolor == (*i)->int_attrib("color")) {              if (mycolor == (*i)->int_attrib("color") && (*i)->state==BLINKING) {
2426                  change_state(OPEN);                  change_state(OPEN);
2427                  (*i)->change_state(OPEN);                  (*i)->change_state(OPEN);
2428              } else {              } else {

Legend:
Removed from v.1.44  
changed lines
  Added in v.1.45

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26