Código


Public J1 As String
Public J2 As String
Public J3 As String
Public J4 As String

Public MoneyJ1
Public MoneyJ2
Public MoneyJ3
Public MoneyJ4

Public turn

Public PosJ1 As Integer
Public PosJ2 As Integer
Public PosJ3 As Integer
Public PosJ4 As Integer

Public JailJ1 As Boolean
Public JailJ2 As Boolean
Public JailJ3 As Boolean
Public JailJ4 As Boolean

Public tJ1 As Integer
Public tJ2 As Integer
Public tJ3 As Integer
Public tJ4 As Integer
'

Public Function CasillaActual(ByRef casas() As String)

Ā Ā Ā  casas(0, 0) = "Salida"
Ā Ā Ā  casas(0, 0) = "Salida"
Ā Ā Ā  casas(0, 1) = "M14"
Ā Ā Ā  casas(1, 0) = "Mediterranean Avenue"
Ā Ā Ā  casas(1, 1) = "L14"
Ā Ā Ā  casas(2, 0) = "Caja de comunidad"
Ā Ā Ā  casas(2, 1) = "K14"
Ā Ā Ā  casas(3, 0) = "Baltic Avenue"
Ā Ā Ā  casas(3, 1) = "J14"
Ā Ā Ā  casas(4, 0) = "Income Tax"
Ā Ā Ā  casas(4, 1) = "I14"
Ā Ā Ā  casas(5, 0) = "Reading Railroad"
Ā Ā Ā  casas(5, 1) = "H14"
Ā Ā Ā  casas(6, 0) = "Oriental Avenue"
Ā Ā Ā  casas(6, 1) = "G14"
Ā Ā Ā  casas(7, 0) = "Suerte"
Ā Ā Ā  casas(7, 1) = "F14"
Ā Ā Ā  casas(8, 0) = "Vermont Avenue"
Ā Ā Ā  casas(8, 1) = "E14"
Ā Ā Ā  casas(9, 0) = "Connecticut Avenue"
Ā Ā Ā  casas(9, 1) = "D14"
Ā Ā Ā  casas(10, 0) = "Just Visiting (jail)"
Ā Ā Ā  casas(10, 1) = "B13"
Ā Ā Ā  casas(11, 0) = "St. Charles Place"
Ā Ā Ā  casas(11, 1) = "B12"
Ā Ā Ā  casas(12, 0) = "Electric Company"
Ā Ā Ā  casas(12, 1) = "B11"
Ā Ā Ā  casas(13, 0) = "States Avenue"
Ā Ā Ā  casas(13, 1) = "B10"
Ā Ā Ā  casas(14, 0) = "Virginia Avenue"
Ā Ā Ā  casas(14, 1) = "B9"
Ā Ā Ā  casas(15, 0) = "Pennsylvania Railroad"
Ā Ā Ā  casas(15, 1) = "B8"
Ā Ā Ā  casas(16, 0) = "St. James Place"
Ā Ā Ā  casas(16, 1) = "B7"
Ā Ā Ā  casas(17, 0) = "Caja de comunidad"
Ā Ā Ā  casas(17, 1) = "B6"
Ā Ā Ā  casas(18, 0) = "Tennessee Avenue"
Ā Ā Ā  casas(18, 1) = "B5"
Ā Ā Ā  casas(19, 0) = "New York Avenue"
Ā Ā Ā  casas(19, 1) = "B4"
Ā Ā Ā  casas(20, 0) = "Free Parking"
Ā Ā Ā  casas(20, 1) = "C2"
Ā Ā Ā  casas(21, 0) = "Kentucky Avenue"
Ā Ā Ā  casas(21, 1) = "D2"
Ā Ā Ā  casas(22, 0) = "Suerte"
Ā Ā Ā  casas(22, 1) = "E2"
Ā Ā Ā  casas(23, 0) = "Indiana Avenue"
Ā Ā Ā  casas(23, 1) = "F2"
Ā Ā Ā  casas(24, 0) = "Illinois Avenue"
Ā Ā Ā  casas(24, 1) = "G2"
Ā Ā Ā  casas(25, 0) = "B&O Railroad"
Ā Ā Ā  casas(25, 1) = "H2"
Ā Ā Ā  casas(26, 0) = "Atlantic Avenue"
Ā Ā Ā  casas(26, 1) = "I2"
Ā Ā Ā  casas(27, 0) = "Ventnor Avenue"
Ā Ā Ā  casas(27, 1) = "J2"
Ā Ā Ā  casas(28, 0) = "Water Works"
Ā Ā Ā  casas(28, 1) = "K2"
Ā Ā Ā  casas(29, 0) = "Maryn Gardens"
Ā Ā Ā  casas(29, 1) = "L2"
Ā Ā Ā  casas(30, 0) = "Go to jail"
Ā Ā Ā  casas(30, 1) = "N3"
Ā Ā Ā  casas(31, 0) = "Pacific Avenue"
Ā Ā Ā  casas(31, 1) = "N4"
Ā Ā Ā  casas(32, 0) = "North Carolina Avenue"
Ā Ā Ā  casas(32, 1) = "N5"
Ā Ā Ā  casas(33, 0) = "Caja de comunidad"
Ā Ā Ā  casas(33, 1) = "N6"
Ā Ā Ā  casas(34, 0) = "Pennsylvania Avenue"
Ā Ā Ā  casas(34, 1) = "N7"
Ā Ā Ā  casas(35, 0) = "Short Line"
Ā Ā Ā  casas(35, 1) = "N8"
Ā Ā Ā  casas(36, 0) = "Suerte"
Ā Ā Ā  casas(36, 1) = "N9"
Ā Ā Ā  casas(37, 0) = "Park Place"
Ā Ā Ā  casas(37, 1) = "N10"
Ā Ā Ā  casas(38, 0) = "Luxury Tax"
Ā Ā Ā  casas(38, 1) = "N11"
Ā Ā Ā  casas(39, 0) = "Broadwalk"
Ā Ā Ā  casas(39, 1) = "N12"
Ā Ā 
If turn = 1 Then
Ā Ā Ā  TextBox8.Text = casas(PosJ1, 0)
End If

If turn = 2 Then
Ā Ā Ā  TextBox8.Text = casas(PosJ2, 0)
End If

If turn = 3 Then
Ā Ā Ā  TextBox8.Text = casas(PosJ3, 0)
End If

If turn = 4 Then
Ā Ā Ā  TextBox8.Text = casas(PosJ4, 0)
End If

End Function


Public Sub Suerte()

Dim Numero As Integer
Ā  Numero = Int((6 - 1 + 1) * Rnd() + 1)

Ā  If Numero = 5 Then
  Range("V8").Value = ("Te tocó la lotería: Ganas 1000$")
Ā Ā Ā  If turn = 0 Then
Ā Ā Ā  MoneyJ4 = MoneyJ4 + 1000
Ā Ā Ā  End If
Ā Ā Ā  If turn = 1 Then
Ā Ā Ā  MoneyJ1 = MoneyJ1 + 1000
Ā Ā Ā  End If
Ā Ā Ā  If turn = 2 Then
Ā Ā Ā  MoneyJ2 = MoneyJ2 + 1000
Ā Ā Ā  End If
Ā Ā Ā  If turn = 3 Then
Ā Ā Ā  MoneyJ3 = MoneyJ3 + 1000
Ā Ā Ā  End If
Ā Ā Ā 
Ā  Else
Ā  Range("V8").Value = ("No pagaste los impuestos correspondientes:" & vbCrLf & "Pagas una multa de 500$")
Ā Ā Ā  If turn = 0 Then
Ā Ā Ā  MoneyJ4 = MoneyJ4 - 500
Ā Ā Ā  End If
Ā Ā Ā  If turn = 1 Then
Ā Ā Ā  MoneyJ1 = MoneyJ1 - 500
Ā Ā Ā  End If
Ā Ā Ā  If turn = 2 Then
Ā Ā Ā  MoneyJ2 = MoneyJ2 - 500
Ā Ā Ā  End If
Ā Ā Ā  If turn = 3 Then
Ā Ā Ā  MoneyJ3 = MoneyJ3 - 500
Ā Ā Ā  End If
Ā 
Ā  End If

End Sub


Public Sub PrecioCalle(ByRef casas() As String)

Ā 'Creo una array con 40 elementos para cada propiedad
Ā Ā  casas(0) = 0
Ā Ā  casas(1) = 60
Ā Ā  casas(2) = 0
Ā Ā  casas(3) = 60
Ā Ā  casas(4) = 0
Ā Ā  casas(5) = 200
Ā Ā  casas(6) = 100
Ā Ā  casas(7) = 0
Ā Ā  casas(8) = 100
Ā Ā  casas(9) = 120
Ā Ā  casas(10) = 0
Ā Ā  casas(11) = 140
Ā Ā  casas(12) = 150
Ā Ā  casas(13) = 140
Ā Ā  casas(14) = 160
Ā Ā  casas(15) = 200
Ā Ā  casas(16) = 160
Ā Ā  casas(17) = 0
Ā Ā  casas(18) = 180
Ā Ā  casas(19) = 200
Ā Ā  casas(20) = 0
Ā Ā  casas(21) = 200
Ā Ā  casas(22) = 0
Ā Ā  casas(23) = 220
Ā Ā  casas(24) = 240
Ā Ā  casas(25) = 200
Ā Ā  casas(26) = 240
Ā Ā  casas(27) = 260
Ā Ā  casas(28) = 150
Ā Ā  casas(29) = 280
Ā Ā  casas(30) = 0
Ā Ā  casas(31) = 280
Ā Ā  casas(32) = 300
Ā Ā  casas(33) = 0
Ā Ā  casas(34) = 320
Ā Ā  casas(35) = 200
Ā Ā  casas(36) = 0
Ā Ā  casas(37) = 320
Ā Ā  casas(38) = 0
Ā Ā  casas(39) = 340

End Sub


Public Sub PrecioEstancia(ByRef casas() As String)

Ā 'Creo una array con 40 elementos para cada propiedad
Ā Ā  casas(0) = 0
Ā Ā  casas(1) = 6
Ā Ā  casas(2) = 0
Ā Ā  casas(3) = 6
Ā Ā  casas(4) = 0
Ā Ā  casas(5) = 20
Ā Ā  casas(6) = 10
Ā Ā  casas(7) = 0
Ā Ā  casas(8) = 10
Ā Ā  casas(9) = 12
Ā Ā  casas(10) = 0
Ā Ā  casas(11) = 14
Ā Ā  casas(12) = 15
Ā Ā  casas(13) = 14
Ā Ā  casas(14) = 16
Ā Ā  casas(15) = 20
Ā Ā  casas(16) = 16
Ā Ā  casas(17) = 0
Ā Ā  casas(18) = 18
Ā Ā  casas(19) = 20
Ā Ā  casas(20) = 0
Ā Ā  casas(21) = 20
Ā Ā  casas(22) = 0
Ā Ā  casas(23) = 22
Ā Ā  casas(24) = 24
Ā Ā  casas(25) = 2
Ā Ā  casas(26) = 24
Ā Ā  casas(27) = 26
Ā Ā  casas(28) = 15
Ā Ā  casas(29) = 28
Ā Ā  casas(30) = 0
Ā Ā  casas(31) = 28
Ā Ā  casas(32) = 30
Ā Ā  casas(33) = 0
Ā Ā  casas(34) = 32
Ā Ā  casas(35) = 20
Ā Ā  casas(36) = 0
Ā Ā  casas(37) = 32
Ā Ā  casas(38) = 0
Ā Ā  casas(39) = 34

End Sub


Public Sub CajaComunidad()

Dim Numero As Integer
Numero = Int((8 - 1 + 1) * Rnd() + 1)

If Numero = 5 Then
Ā Ā Ā  Range("V10").Value = ("Has ganado el primer premio de un concurso:" & vbCrLf & "Ganas 300$")
Ā Ā Ā  If turn = 0 Then
Ā Ā Ā Ā Ā Ā Ā  MoneyJ4 = MoneyJ4 + 300
Ā Ā Ā  End If
Ā Ā Ā  If turn = 1 Then
Ā Ā Ā Ā Ā Ā Ā  MoneyJ1 = MoneyJ1 + 300
Ā Ā Ā  End If
Ā Ā Ā  If turn = 2 Then
Ā Ā Ā Ā Ā Ā Ā  MoneyJ2 = MoneyJ2 + 300
Ā Ā Ā  End If
Ā Ā Ā  If turn = 3 Then
Ā Ā Ā Ā Ā Ā Ā  MoneyJ3 = MoneyJ3 + 300
Ā Ā Ā  End If
Ā 
Else
Ā Ā Ā  Range("V10").Value = ("Multa por exceso de velocidad" & vbCrLf & "Pagas una multa de 60$")
Ā Ā Ā  If turn = 0 Then
Ā Ā Ā Ā Ā Ā Ā  MoneyJ4 = MoneyJ4 - 60
Ā Ā Ā  End If
Ā Ā Ā  If turn = 1 Then
Ā Ā Ā Ā Ā Ā Ā  MoneyJ1 = MoneyJ1 - 60
Ā Ā Ā  End If
Ā Ā Ā  If turn = 2 Then
Ā Ā Ā Ā Ā Ā Ā  MoneyJ2 = MoneyJ2 - 60
Ā Ā Ā  End If
Ā Ā Ā  If turn = 3 Then
Ā Ā Ā Ā Ā Ā Ā  MoneyJ3 = MoneyJ3 - 60
Ā Ā Ā  End If
Ā 
End If

End Sub


Private Sub Botón_PropiedadExit_Click() 'CERRAR VENTANA PROPIEDADES

Text_PropiedadTĆ­tulo.Visible = False
Text_PropiedadInfo.Visible = False
Botón_PropiedadVender.Visible = False

'Buscar forma de crear una sucesión para saber el precio. Tener en cuenta casillas de suerte y caj. comunidad
'Es una sucesión que se debería de obtener mediante una fórmula. El primer término es 200

FondoPropiedades.Visible = False
Botón_PropiedadExit.Visible = False
TextBox6.Visible = False
TextBox7.Visible = False

End Sub

Private Sub CommandButton1_Click() 'SALIR
Application.Quit

End Sub


Private Sub CommandButton2_Click() 'NUEVA PARTIDA

'Dinero inicial
InitMoney = 600
MoneyJ1 = InitMoney
MoneyJ2 = InitMoney
MoneyJ3 = InitMoney
MoneyJ4 = InitMoney

'Posiciones a 0
PosJ1 = 0
PosJ2 = 0
PosJ3 = 0
PosJ4 = 0

'Turno a 0
turn = 0

'Propiedades de nadie
Range("A1:N14").Interior.Color = RGB(255, 255, 255)

'Fichas a M13
ActiveSheet.Shapes(19).Top = ActiveSheet.Range("M13").Top + 12
ActiveSheet.Shapes(19).Left = ActiveSheet.Range("M13").Left + 12
ActiveSheet.Shapes(20).Top = ActiveSheet.Range("M13").Top + 12
ActiveSheet.Shapes(20).Left = ActiveSheet.Range("M13").Left + 45
ActiveSheet.Shapes(21).Top = ActiveSheet.Range("M13").Top + 42
ActiveSheet.Shapes(21).Left = ActiveSheet.Range("M13").Left + 12
ActiveSheet.Shapes(22).Top = ActiveSheet.Range("M13").Top + 42
ActiveSheet.Shapes(22).Left = ActiveSheet.Range("M13").Left + 45

'Dados a 0
Range("W6").Value = 0
Range("X6").Value = 0
TextBox1.Text = 0

'Borrar carteles Suerte/CajaComunidad
Range("V8").Value = ("Caja de comunidad")
Range("V10").Value = ("Suerte")

'Todos desencarcelados
JailJ1 = False
JailJ2 = False
JailJ3 = False
JailJ4 = False
tJ1 = 0
tJ2 = 0
tJ3 = 0
tJ4 = 0

TextBox2.Visible = False
CommandButton4.Visible = False
TextBox3.Visible = False
CommandButton7.Visible = False
TextBox4.Visible = False
CommandButton8.Visible = False
TextBox5.Visible = False
CommandButton9.Visible = False

'Nombres de los jugadores?
J1 = InputBox("Nombre:", "Jugador 1")
J2 = InputBox("Nombre:", "Jugador 2")
J3 = InputBox("Nombre:", "Jugador 3")
J4 = InputBox("Nombre:", "Jugador 4")

'Actualizar dinero y nombres
Range("P4").Value = "NOMBRE: " & J1 & vbCrLf & "DINERO: " & MoneyJ1 & "$"
Range("P6").Value = "NOMBRE: " & J2 & vbCrLf & "DINERO: " & MoneyJ2 & "$"
Range("P8").Value = "NOMBRE: " & J3 & vbCrLf & "DINERO: " & MoneyJ3 & "$"
Range("P10").Value = "NOMBRE: " & J4 & vbCrLf & "DINERO: " & MoneyJ4 & "$"

'Casilla actual
TextBox8.Text = "Casilla actual"

'info: pos de cada jugador
Range("AA4").Value = PosJ1
Range("AA5").Value = PosJ2
Range("AA6").Value = PosJ3
Range("AA7").Value = PosJ4

End Sub


Private Sub CommandButton3_Click() 'TIRAR DADOS

'Cambio de turno
turn = turn + 1
If turn = 5 Then
Ā Ā Ā  turn = turn - 4
End If

'Valores de los dados
Dim NumeroAleatorio As Integer

NumeroAleatorio = Int((6 - 1 + 1) * Rnd() + 1)
Range("W6").Value = NumeroAleatorio

NumeroAleatorio = Int((6 - 1 + 1) * Rnd() + 1)
Range("X6").Value = NumeroAleatorio

TextBox1.Text = Range("W6").Value + Range("X6").Value

'Borrar carteles Suerte/CajaComunidad
Range("V8").Value = ("Caja de comunidad")
Range("V10").Value = ("Suerte")

'Mover fichas
Call MoverFicha
Ā Ā Ā 
'Acción por tipo de casilla:
If turn = 1 Then
Ā Ā Ā  If PosJ1 = 2 Or PosJ1 = 17 Or PosJ1 = 33 Then
Ā Ā Ā Ā Ā Ā Ā  Call CajaComunidad
Ā Ā Ā  End If
Ā Ā Ā  If PosJ1 = 7 Or PosJ1 = 22 Or PosJ1 = 36 Then
Ā Ā Ā Ā Ā Ā Ā  Call Suerte
Ā Ā Ā  End If
Ā Ā Ā  If PosJ1 = 30 Then
Ā Ā Ā Ā Ā Ā Ā  Call Jail
Ā Ā Ā  End If
Ā Ā Ā  If PosJ1 = 4 Then
Ā Ā Ā Ā Ā Ā Ā  MoneyJ1 = MoneyJ1 - 200
Ā Ā Ā  End If
Ā Ā Ā  If PosJ1 = 38 Then
Ā Ā Ā Ā Ā Ā Ā  MoneyJ1 = MoneyJ1 - 500
Ā Ā Ā  End If
End If

If turn = 2 Then
Ā Ā Ā  If PosJ2 = 2 Or PosJ1 = 17 Or PosJ2 = 33 Then
Ā Ā Ā Ā Ā Ā Ā  Call CajaComunidad
Ā Ā Ā  End If
Ā Ā Ā  If PosJ2 = 7 Or PosJ1 = 22 Or PosJ2 = 36 Then
Ā Ā Ā Ā Ā Ā Ā  Call Suerte
Ā Ā Ā  End If
Ā Ā Ā  If PosJ2 = 30 Then
Ā Ā Ā Ā Ā Ā Ā  Call Jail
Ā Ā Ā  End If
Ā Ā Ā  If PosJ2 = 4 Then
Ā Ā Ā Ā Ā Ā Ā  MoneyJ2 = MoneyJ2 - 200
Ā Ā Ā  End If
Ā Ā Ā  If PosJ2 = 38 Then
Ā Ā Ā Ā Ā Ā Ā  MoneyJ2 = MoneyJ2 - 500
Ā Ā Ā  End If
End If

If turn = 3 Then
Ā Ā Ā  If PosJ3 = 2 Or PosJ3 = 17 Or PosJ3 = 33 Then
Ā Ā Ā Ā Ā Ā Ā  Call CajaComunidad
Ā Ā Ā  End If
Ā Ā Ā  If PosJ3 = 7 Or PosJ3 = 22 Or PosJ3 = 36 Then
Ā Ā Ā Ā Ā Ā Ā  Call Suerte
Ā Ā Ā  End If
Ā Ā Ā  If PosJ3 = 30 Then
Ā Ā Ā Ā Ā Ā Ā  Call Jail
Ā Ā Ā  End If
Ā Ā Ā  If PosJ3 = 4 Then
Ā Ā Ā Ā Ā Ā Ā  MoneyJ3 = MoneyJ3 - 200
Ā Ā Ā  End If
Ā Ā Ā  If PosJ3 = 38 Then
Ā Ā Ā Ā Ā Ā Ā  MoneyJ3 = MoneyJ3 - 500
Ā Ā Ā  End If
End If

If turn = 4 Then
Ā Ā Ā  If PosJ4 = 2 Or PosJ4 = 17 Or PosJ4 = 33 Then
Ā Ā Ā Ā Ā Ā Ā  Call CajaComunidad
Ā Ā Ā  End If
Ā Ā Ā  If PosJ4 = 7 Or PosJ4 = 22 Or PosJ4 = 36 Then
Ā Ā Ā Ā Ā Ā Ā  Call Suerte
Ā Ā Ā  End If
Ā Ā Ā  If PosJ4 = 30 Then
Ā Ā Ā Ā Ā Ā Ā  Call Jail
Ā Ā Ā  End If
Ā Ā Ā  If PosJ4 = 4 Then
Ā Ā Ā Ā Ā Ā Ā  MoneyJ4 = MoneyJ4 - 200
Ā Ā Ā  End If
Ā Ā Ā  If PosJ4 = 38 Then
Ā Ā Ā Ā Ā Ā Ā  MoneyJ4 = MoneyJ4 - 500
Ā Ā Ā  End If
End If

'Actualizar dinero (y nombres)
Range("P4").Value = "NOMBRE: " & J1 & vbCrLf & "DINERO: " & MoneyJ1 & "$"
Range("P6").Value = "NOMBRE: " & J2 & vbCrLf & "DINERO: " & MoneyJ2 & "$"
Range("P8").Value = "NOMBRE: " & J3 & vbCrLf & "DINERO: " & MoneyJ3 & "$"
Range("P10").Value = "NOMBRE: " & J4 & vbCrLf & "DINERO: " & MoneyJ4 & "$"

'info: pos de cada jugador
Range("AA4").Value = PosJ1
Range("AA5").Value = PosJ2
Range("AA6").Value = PosJ3
Range("AA7").Value = PosJ4

End Sub


Public Sub Jail() 'ENCARCELAMIENTO

If turn = 1 Then
Ā Ā Ā  JailJ1 = True
Ā Ā Ā  PosJ1 = 10
Ā Ā Ā  ActiveSheet.Shapes(19).Top = ActiveSheet.Range("C13").Top + 12
Ā Ā Ā  ActiveSheet.Shapes(19).Left = ActiveSheet.Range("C13").Left + 12
Ā Ā Ā  TextBox2.Visible = True
Ā Ā Ā  CommandButton4.Visible = True
End If

If turn = 2 Then
Ā Ā Ā  JailJ2 = True
Ā Ā Ā  PosJ2 = 10
Ā Ā Ā  ActiveSheet.Shapes(20).Top = ActiveSheet.Range("C13").Top + 12
Ā Ā Ā  ActiveSheet.Shapes(20).Left = ActiveSheet.Range("C13").Left + 45
Ā Ā Ā  TextBox3.Visible = True
Ā Ā Ā  CommandButton7.Visible = True
End If

If turn = 3 Then
Ā Ā Ā  JailJ3 = True
Ā Ā Ā  PosJ3 = 10
Ā Ā Ā  ActiveSheet.Shapes(21).Top = ActiveSheet.Range("C13").Top + 42
Ā Ā Ā  ActiveSheet.Shapes(21).Left = ActiveSheet.Range("C13").Left + 12
Ā Ā Ā  TextBox4.Visible = True
Ā Ā Ā  CommandButton8.Visible = True
End If

If turn = 4 Then
Ā Ā Ā  JailJ4 = True
Ā Ā Ā  PosJ4 = 10
Ā Ā Ā  ActiveSheet.Shapes(22).Top = ActiveSheet.Range("C13").Top + 42
Ā Ā Ā  ActiveSheet.Shapes(22).Left = ActiveSheet.Range("C13").Left + 45
Ā Ā Ā  TextBox5.Visible = True
Ā Ā Ā  CommandButton9.Visible = True
End If

End Sub


Public Sub MoverFicha()
Ā Ā Ā 
If turn = 1 Then
Ā Ā Ā  If tJ1 = 3 Or JailJ1 = False Then
Ā Ā Ā Ā Ā Ā Ā  tJ1 = 0
Ā Ā Ā Ā Ā Ā Ā  PosJ1 = PosJ1 + Range("W6").Value + Range("X6").Value
Ā Ā Ā Ā Ā Ā Ā  If PosJ1 > 39 Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  PosJ1 = PosJ1 - 40
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  MoneyJ1 = MoneyJ1 + 200
Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā  If PosJ1 < 10 Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  x = 13
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  y = 13 - (PosJ1 - 0)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  ActiveSheet.Shapes(19).Top = ActiveSheet.Range(Cells(x, y), Cells(x, y)).Top + 15
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  ActiveSheet.Shapes(19).Left = ActiveSheet.Range(Cells(x, y), Cells(x, y)).Left + 15
Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā  If PosJ1 >= 10 And PosJ1 < 20 Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  y = 3
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  x = 13 - (PosJ1 - 10)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  ActiveSheet.Shapes(19).Top = ActiveSheet.Range(Cells(x, y), Cells(x, y)).Top + 15
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  ActiveSheet.Shapes(19).Left = ActiveSheet.Range(Cells(x, y), Cells(x, y)).Left + 15
Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā  If PosJ1 >= 20 And PosJ1 < 30 Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  x = 3
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  y = 3 + (PosJ1 - 20)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  ActiveSheet.Shapes(19).Top = ActiveSheet.Range(Cells(x, y), Cells(x, y)).Top + 15
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  ActiveSheet.Shapes(19).Left = ActiveSheet.Range(Cells(x, y), Cells(x, y)).Left + 15
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā  If PosJ1 >= 30 Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  y = 13
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  x = 3 + (PosJ1 - 30)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  ActiveSheet.Shapes(19).Top = ActiveSheet.Range(Cells(x, y), Cells(x, y)).Top + 15
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  ActiveSheet.Shapes(19).Left = ActiveSheet.Range(Cells(x, y), Cells(x, y)).Left + 15
Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā 
Ā Ā Ā Ā Ā Ā Ā  Dim casas(40, 2) As String
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Call CasillaActual(casas)
Ā Ā Ā Ā Ā Ā Ā Ā Ā  If PosJ1 = 0 Or PosJ1 = 2 Or PosJ1 = 4 Or PosJ1 = 7 Or PosJ1 = 10 Or PosJ1 = 17 Or PosJ1 = 20 Or PosJ1 = 22 Or PosJ1 = 30 Or PosJ1 = 33 Or PosJ1 = 36 Or PosJ1 = 38 Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā  Else
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  If Range(casas(PosJ1, 1)).Interior.Color = RGB(200, 160, 27) Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Else
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  If Range(casas(PosJ1, 1)).Interior.Color = RGB(255, 255, 255) Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Dim Mensaje, Botones, TĆ­tulo, Respuesta
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Mensaje = J1 & vbCrLf & "ĀæDesea comprar esta calle?"
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Botones = vbYesNo + vbQuestion + vbDefaultButton2
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  TĆ­tulo = "Comprar calle"
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Respuesta = MsgBox(Mensaje, Botones, TĆ­tulo)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā 
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  If Respuesta = vbYes Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā 
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Range(casas(PosJ1, 1)).Interior.Color = RGB(200, 160, 27)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā 
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Dim Precio(40) As String
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Call PrecioCalle(Precio)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā 
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  MoneyJ1 = MoneyJ1 - Precio(PosJ1)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  If Not Range(casas(PosJ4, 1)).Interior.Color = RGB(200, 160, 27) Or Range(casas(PosJ4, 1)).Interior.Color = RGB(255, 255, 255) Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  'MoneyJ1 = MoneyJ1 - 50
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  'Dim Precio(40) As String
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Call PrecioCalle(Precio)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā 
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  MoneyJ1 = MoneyJ1 - CInt(Precio(PosJ1)) / 10
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Call ActualizarMoney(PosJ1, 1, CInt(Precio(PosJ1)) / 10)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā  Else
Ā Ā Ā Ā Ā Ā Ā  tJ1 = tJ1 + 1
Ā Ā Ā Ā Ā Ā Ā  If tJ1 >= 3 Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  TextBox2.Visible = False
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  CommandButton4.Visible = False
Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā  End If


If turn = 2 Then
Ā Ā Ā  If tJ2 = 3 Or JailJ2 = False Then
Ā Ā Ā Ā Ā Ā Ā  tJ2 = 0
Ā Ā Ā Ā Ā Ā Ā  PosJ2 = PosJ2 + Range("W6").Value + Range("X6").Value
Ā Ā Ā Ā Ā Ā Ā  If PosJ2 > 39 Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  PosJ2 = PosJ2 - 40
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  MoneyJ2 = MoneyJ2 + 200
Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā 
Ā Ā Ā Ā Ā Ā Ā  If PosJ2 < 10 Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  x = 13
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  y = 13 - (PosJ2 - 0)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  ActiveSheet.Shapes(20).Top = ActiveSheet.Range(Cells(x, y), Cells(x, y)).Top + 15
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  ActiveSheet.Shapes(20).Left = ActiveSheet.Range(Cells(x, y), Cells(x, y)).Left + 15
Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā  If PosJ2 >= 10 And PosJ2 < 20 Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  y = 3
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  x = 13 - (PosJ2 - 10)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  ActiveSheet.Shapes(20).Top = ActiveSheet.Range(Cells(x, y), Cells(x, y)).Top + 15
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  ActiveSheet.Shapes(20).Left = ActiveSheet.Range(Cells(x, y), Cells(x, y)).Left + 15
Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā  If PosJ2 >= 20 And PosJ2 < 30 Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  x = 3
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  y = 3 + (PosJ2 - 20)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  ActiveSheet.Shapes(20).Top = ActiveSheet.Range(Cells(x, y), Cells(x, y)).Top + 15
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  ActiveSheet.Shapes(20).Left = ActiveSheet.Range(Cells(x, y), Cells(x, y)).Left + 15
Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā  If PosJ2 >= 30 Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  y = 13
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  x = 3 + (PosJ2 - 30)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  ActiveSheet.Shapes(20).Top = ActiveSheet.Range(Cells(x, y), Cells(x, y)).Top + 15
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  ActiveSheet.Shapes(20).Left = ActiveSheet.Range(Cells(x, y), Cells(x, y)).Left + 15
Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā 
Ā Ā Ā Ā Ā Ā Ā  'Nombre casilla actual
Ā Ā Ā Ā Ā Ā Ā  Call CasillaActual(casas)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā 
Ā Ā Ā Ā Ā Ā Ā  'Dim casas(40, 2) As String
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Call CasillaActual(casas)
Ā Ā Ā Ā Ā Ā Ā  If PosJ2 = 0 Or PosJ2 = 2 Or PosJ2 = 4 Or PosJ2 = 7 Or PosJ2 = 10 Or PosJ2 = 17 Or PosJ2 = 20 Or PosJ2 = 22 Or PosJ2 = 30 Or PosJ2 = 33 Or PosJ2 = 36 Or PosJ2 = 38 Then
Ā Ā Ā Ā Ā Ā Ā  Else
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  If Range(casas(PosJ2, 1)).Interior.Color = RGB(220, 30, 35) Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Else
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  If Range(casas(PosJ2, 1)).Interior.Color = RGB(255, 255, 255) Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  'Dim Mensaje, Botones, TĆ­tulo, Respuesta
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Mensaje = J2 & vbCrLf & "ĀæDesea comprar esta calle?"
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Botones = vbYesNo + vbQuestion + vbDefaultButton2
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  TĆ­tulo = "Comprar calle"
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Respuesta = MsgBox(Mensaje, Botones, TĆ­tulo)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā 
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  If Respuesta = vbYes Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā 
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Range(casas(PosJ2, 1)).Interior.Color = RGB(220, 30, 35)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā 
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  'Dim Precio(40) As String
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Call PrecioCalle(Precio)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā 
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  MoneyJ2 = MoneyJ2 - Precio(PosJ2)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  If Not Range(casas(PosJ2, 1)).Interior.Color = RGB(220, 30, 35) Or Range(casas(PosJ2, 1)).Interior.Color = RGB(255, 255, 255) Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  'MoneyJ2 = MoneyJ2 - 50
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Call PrecioCalle(Precio)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā 
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  MoneyJ2 = MoneyJ2 - CInt(Precio(PosJ2)) / 10
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Call ActualizarMoney(PosJ2, 1, CInt(Precio(PosJ2)) / 10)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā  tJ2 = tJ2 + 1
Ā Ā Ā Ā Ā Ā Ā  If tJ2 >= 3 Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  TextBox3.Visible = False
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  CommandButton7.Visible = False
Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā  End If
End If


If turn = 3 Then
Ā Ā Ā  If tJ3 = 3 Or JailJ3 = False Then
Ā Ā Ā Ā Ā Ā Ā  tJ3 = 0
Ā Ā Ā Ā Ā Ā Ā  PosJ3 = PosJ3 + Range("W6").Value + Range("X6").Value
Ā Ā Ā Ā Ā Ā Ā  If PosJ3 > 39 Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  PosJ3 = PosJ3 - 40
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  MoneyJ3 = MoneyJ3 + 200
Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā 
Ā Ā Ā Ā Ā Ā Ā  If PosJ3 < 10 Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  x = 13
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  y = 13 - (PosJ3 - 0)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  ActiveSheet.Shapes(21).Top = ActiveSheet.Range(Cells(x, y), Cells(x, y)).Top + 15
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  ActiveSheet.Shapes(21).Left = ActiveSheet.Range(Cells(x, y), Cells(x, y)).Left + 15
Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā  If PosJ3 >= 10 And PosJ3 < 20 Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  y = 3
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  x = 13 - (PosJ3 - 10)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  ActiveSheet.Shapes(21).Top = ActiveSheet.Range(Cells(x, y), Cells(x, y)).Top + 15
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  ActiveSheet.Shapes(21).Left = ActiveSheet.Range(Cells(x, y), Cells(x, y)).Left + 15
Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā  If PosJ3 >= 20 And PosJ3 < 30 Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  x = 3
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  y = 3 + (PosJ3 - 20)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  ActiveSheet.Shapes(21).Top = ActiveSheet.Range(Cells(x, y), Cells(x, y)).Top + 15
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  ActiveSheet.Shapes(21).Left = ActiveSheet.Range(Cells(x, y), Cells(x, y)).Left + 15
Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā  If PosJ3 >= 30 Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  y = 13
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  x = 3 + (PosJ3 - 30)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  ActiveSheet.Shapes(21).Top = ActiveSheet.Range(Cells(x, y), Cells(x, y)).Top + 15
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  ActiveSheet.Shapes(21).Left = ActiveSheet.Range(Cells(x, y), Cells(x, y)).Left + 15
Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā 
Ā Ā Ā Ā Ā Ā Ā  'Nombre casilla actual
Ā Ā Ā Ā Ā Ā Ā  Call CasillaActual(casas)
Ā Ā Ā Ā Ā Ā Ā  If PosJ3 = 0 Or PosJ3 = 2 Or PosJ3 = 4 Or PosJ3 = 7 Or PosJ3 = 10 Or PosJ3 = 17 Or PosJ3 = 20 Or PosJ3 = 22 Or PosJ3 = 30 Or PosJ3 = 33 Or PosJ3 = 36 Or PosJ3 = 38 Then
Ā Ā Ā Ā Ā Ā Ā  Else
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā 
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  If Range(casas(PosJ3, 1)).Interior.Color = RGB(34, 177, 36) Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Else
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  If Range(casas(PosJ3, 1)).Interior.Color = RGB(255, 255, 255) Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  'Dim Mensaje, Botones, TĆ­tulo, Respuesta
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Mensaje = J3 & vbCrLf & "ĀæDesea comprar esta calle?"
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Botones = vbYesNo + vbQuestion + vbDefaultButton2
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  TĆ­tulo = "Comprar calle"
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Respuesta = MsgBox(Mensaje, Botones, TĆ­tulo)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā 
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  If Respuesta = vbYes Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā 
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Range(casas(PosJ3, 1)).Interior.Color = RGB(34, 177, 36)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā 
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  'Dim Precio(40) As String
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Call PrecioCalle(Precio)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā 
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  MoneyJ3 = MoneyJ3 - Precio(PosJ3)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  If Not Range(casas(PosJ2, 1)).Interior.Color = RGB(34, 177, 36) Or Range(casas(PosJ2, 1)).Interior.Color = RGB(255, 255, 255) Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  'MoneyJ3 = MoneyJ3 - 50
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Call PrecioCalle(Precio)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā 
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  MoneyJ3 = MoneyJ3 - CInt(Precio(PosJ3)) / 10
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Call ActualizarMoney(PosJ3, 1, CInt(Precio(PosJ3)) / 10)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā  Else
Ā Ā Ā Ā Ā Ā Ā  tJ3 = tJ3 + 1
Ā Ā Ā Ā Ā Ā Ā  If tJ1 >= 3 Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  TextBox4.Visible = False
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  CommandButton8.Visible = False
Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā  End If
End If


If turn = 4 Then
Ā Ā Ā  If tJ4 = 3 Or JailJ4 = False Then
Ā Ā Ā Ā Ā Ā Ā  tJ4 = 0
Ā Ā Ā Ā Ā Ā Ā  PosJ4 = PosJ4 + Range("W6").Value + Range("X6").Value
Ā Ā Ā Ā Ā Ā Ā  If PosJ4 > 39 Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  PosJ4 = PosJ4 - 40
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  MoneyJ4 = MoneyJ4 + 200
Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā 
Ā Ā Ā Ā Ā Ā Ā  If PosJ4 < 10 Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  x = 13
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  y = 13 - (PosJ4 - 0)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  ActiveSheet.Shapes(22).Top = ActiveSheet.Range(Cells(x, y), Cells(x, y)).Top + 15
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  ActiveSheet.Shapes(22).Left = ActiveSheet.Range(Cells(x, y), Cells(x, y)).Left + 15
Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā  If PosJ4 >= 10 And PosJ4 < 20 Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  y = 3
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  x = 13 - (PosJ4 - 10)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  ActiveSheet.Shapes(22).Top = ActiveSheet.Range(Cells(x, y), Cells(x, y)).Top + 15
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  ActiveSheet.Shapes(22).Left = ActiveSheet.Range(Cells(x, y), Cells(x, y)).Left + 15
Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā  If PosJ4 >= 20 And PosJ4 < 30 Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  x = 3
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  y = 3 + (PosJ4 - 20)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  ActiveSheet.Shapes(22).Top = ActiveSheet.Range(Cells(x, y), Cells(x, y)).Top + 15
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  ActiveSheet.Shapes(22).Left = ActiveSheet.Range(Cells(x, y), Cells(x, y)).Left + 15
Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā  If PosJ4 >= 30 Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  y = 13
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  x = 3 + (PosJ4 - 30)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  ActiveSheet.Shapes(22).Top = ActiveSheet.Range(Cells(x, y), Cells(x, y)).Top + 15
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  ActiveSheet.Shapes(22).Left = ActiveSheet.Range(Cells(x, y), Cells(x, y)).Left + 15
Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā 
Ā Ā Ā Ā Ā Ā Ā  'Nombre casilla actual
Ā Ā Ā Ā Ā Ā Ā  Call CasillaActual(casas)
Ā Ā Ā Ā Ā Ā Ā  If PosJ4 = 0 Or PosJ4 = 2 Or PosJ4 = 4 Or PosJ4 = 7 Or PosJ4 = 10 Or PosJ4 = 17 Or PosJ4 = 20 Or PosJ4 = 22 Or PosJ4 = 30 Or PosJ4 = 33 Or PosJ4 = 36 Or PosJ4 = 38 Then
Ā Ā Ā Ā Ā Ā Ā  Else
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  'Dim casas(40, 2) As String
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  If Range(casas(PosJ4, 1)).Interior.Color = RGB(0, 128, 255) Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Else
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  If Range(casas(PosJ4, 1)).Interior.Color = RGB(255, 255, 255) Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  'Dim Mensaje, Botones, TĆ­tulo, Respuesta
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Mensaje = J4 & vbCrLf & "ĀæDesea comprar esta calle?"
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Botones = vbYesNo + vbQuestion + vbDefaultButton2
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  TĆ­tulo = "Comprar calle"
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Respuesta = MsgBox(Mensaje, Botones, TĆ­tulo)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā 
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  If Respuesta = vbYes Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā 
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Range(casas(PosJ4, 1)).Interior.Color = RGB(0, 128, 255)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā 
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  'Dim Precio(40) As String
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Call PrecioCalle(Precio)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā 
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  MoneyJ4 = MoneyJ4 - Precio(PosJ4)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  If Not Range(casas(PosJ4, 1)).Interior.Color = RGB(0, 128, 255) Or Range(casas(PosJ4, 1)).Interior.Color = RGB(255, 255, 255) Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  'MoneyJ4 = MoneyJ4 - 50
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Call PrecioCalle(Precio)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā 
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  MoneyJ4 = MoneyJ4 - CInt(Precio(PosJ4)) / 10
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Call ActualizarMoney(PosJ4, 1, CInt(Precio(PosJ4)) / 10)
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā  Else
Ā Ā Ā Ā Ā Ā Ā  tJ4 = tJ4 + 1
Ā Ā Ā Ā Ā Ā Ā  If tJ4 >= 3 Then
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  TextBox5.Visible = False
Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  CommandButton9.Visible = False
Ā Ā Ā Ā Ā Ā Ā  End If
Ā Ā Ā  End If
End If

End Sub


Public Sub PrecioPropiedad()

Dim PrecioPropiedad() As String
PrecioPropiedad = PrecioCalle(21) / 15
Ā 
End Sub


Public Sub ActualizarMoney(ByVal nfil As Integer, ByVal ncol As Integer, ByVal Money As Integer)
Dim casas(40, 2) As String
Call CasillaActual(casas)

If Range(casas(nfil, ncol)).Interior.Color = RGB(200, 160, 27) Then 'amarillo
Ā MoneyJ1 = MoneyJ1 + Money
ElseIf Range(casas(nfil, ncol)).Interior.Color = RGB(220, 30, 35) Then 'rojo
Ā MoneyJ2 = MoneyJ2 + Money
ElseIf Range(casas(nfil, ncol)).Interior.Color = RGB(34, 177, 36) Then 'verde
Ā MoneyJ3 = MoneyJ3 + Money
ElseIf Range(casas(nfil, ncol)).Interior.Color = RGB(0, 128, 255) Then 'azul
Ā MoneyJ4 = MoneyJ4 + Money
End If

End Sub