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

Diff of /enigma/src/stones.cc

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

revision 1.4 by reallysoft, Wed May 14 10:47:33 2003 UTC revision 1.5 by reallysoft, Wed May 14 14:11:15 2003 UTC
# Line 69  namespace Line 69  namespace
69            m_clockwise(clockwise)            m_clockwise(clockwise)
70          {}          {}
71      private:      private:
72          static const double RATE = 1.0;          static const double RATE          = 1.0;
73            static const double IMPULSE_DELAY = 0.1;
74    
75          bool m_clockwise;          bool m_clockwise;
76    
77          Stone *clone() { return new RotatorStone(m_clockwise); }          Stone *clone() { return new RotatorStone(m_clockwise); }
# Line 88  namespace Line 90  namespace
90              GridPos p = get_pos();              GridPos p = get_pos();
91    
92              if (m_clockwise) {              if (m_clockwise) {
93                  send_impulse (move(p, NORTH), EAST, 0.1);                  send_impulse (move(p, NORTH), EAST, IMPULSE_DELAY);
94                  send_impulse (move(p, EAST), SOUTH, 0.1);                  send_impulse (move(p, EAST), SOUTH, IMPULSE_DELAY);
95                  send_impulse (move(p, SOUTH), WEST, 0.1);                  send_impulse (move(p, SOUTH), WEST, IMPULSE_DELAY);
96                  send_impulse (move(p, WEST), NORTH, 0.1);                  send_impulse (move(p, WEST), NORTH, IMPULSE_DELAY);
97              } else {              } else {
98                  send_impulse (move(p, NORTH), WEST, 0.1);                  send_impulse (move(p, NORTH), WEST, IMPULSE_DELAY);
99                  send_impulse (move(p, EAST), NORTH, 0.1);                  send_impulse (move(p, EAST), NORTH, IMPULSE_DELAY);
100                  send_impulse (move(p, SOUTH), EAST, 0.1);                  send_impulse (move(p, SOUTH), EAST, IMPULSE_DELAY);
101                  send_impulse (move(p, WEST), SOUTH, 0.1);                  send_impulse (move(p, WEST), SOUTH, IMPULSE_DELAY);
102              }              }
103          }          }
104    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

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