@@ -19,7 +19,7 @@ Hardware notes:
1919
2020Concept/design by Milton Bradley, for use in the Grand Master. Fidelity licensed
2121or bought the design, and applied it nearly unchanged to Fidelity Phantom. Years
22- later, the ex chief engineer of by then defunct Fidelity used the same technology
22+ later, the ex chief engineer of Fidelity ( by then defunct) used the same technology
2323while working for Excalibur.
2424
2525TODO:
@@ -99,8 +99,6 @@ void gmboard_device::device_start()
9999void gmboard_device::device_reset ()
100100{
101101 memset (m_motor_drift, 0 , sizeof (m_motor_drift));
102- m_magnet = 0 ;
103-
104102 output_magnet_pos ();
105103}
106104
@@ -207,7 +205,7 @@ void gmboard_device::magnet_w(int state)
207205 return ;
208206 m_magnet = state;
209207
210- if (m_piece_hand != 0 )
208+ if (m_piece_hand)
211209 realign_magnet_pos ();
212210 output_magnet_pos ();
213211
@@ -229,8 +227,6 @@ void gmboard_device::magnet_w(int state)
229227
230228 if (state)
231229 {
232- bool found = false ;
233-
234230 if (valid_pos)
235231 {
236232 // pick up piece, unless it was picked up by the user
@@ -239,16 +235,15 @@ void gmboard_device::magnet_w(int state)
239235 {
240236 m_piece_hand = m_board->read_piece (x, y);
241237
242- if (m_piece_hand != 0 )
238+ if (m_piece_hand)
243239 {
244- found = true ;
245240 m_board->write_piece (x, y, 0 );
246241 m_board->refresh ();
247242 }
248243 }
249244 }
250245
251- if (!found )
246+ if (!m_piece_hand )
252247 {
253248 int count = 0 ;
254249
@@ -273,6 +268,7 @@ void gmboard_device::magnet_w(int state)
273268 {
274269 LOGMASKED (LOG_MAGNET , " %s piece %2d @ %2d,%2d (%2d,%2d)\n " , state ? " grab" : " drop" , m_piece_hand, x, y, gx, gy);
275270
271+ // drop piece
276272 if (!state)
277273 {
278274 if (valid_pos)
0 commit comments