document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. \' Gambas class file
  2.  
  3. Inherits Comando
  4.  
  5. Private p1 As New Point
  6. Private p2 As New Point
  7.  
  8. Private torigen As Tablero
  9.  
  10. Public Sub _new(t As Tablero, x0 As Integer, y0 As Integer, x1 As Integer, y1 As Integer)
  11.  
  12.   torigen = t
  13.   p1.x = x0
  14.   p1.y = y0
  15.  
  16.   p2.x = x1
  17.   p2.y = y1
  18.  
  19. End
  20.  
  21. Public Sub ejecutar()
  22.  
  23.   torigen.mover(p1.x, p1.y, p2.x, p2.y)
  24.   torigen.dibujalista()  
  25.  
  26. End
  27.  
  28. Public Sub deshacer()
  29.   \'cambio movimiento
  30.  
  31.   torigen.mover(p2.x, p2.y, p1.x, p1.y)
  32.   torigen.dibujalista()  
  33.  
  34.   \'la ficha que esta en la p2, la pone en la p1
  35.   \'htab.cambiar(pieza, pto2, tpo1)
  36.  
  37. End
');