Entrar
¿Nuevo usuario? Inscribirme
squeakRos
? ¿Ya estás suscrito? Entra a Yahoo!

Consejos

¿Sabías que...?
Podés cambiar el orden de los mensajes. Simplemente hacé clic en el enlace de columna fecha. Tus preferencias se guardarán, por lo tanto no necesitarás hacerlo otra vez cuando vuelvas a entrar.

Mensajes

  Mensajes Ayuda
Avanzado
Mensajes 457 - 486 de 3451   Más reciente  |  < Más reciente  |  Más antiguo >  |  Más antiguo
Mensajes: Mostrar resúmenes de los mensajes   (Agrupar por tema) Clasificar por fecha v  
#486 De: "Lic. Edgar J. De Cleene" <edgardec2001@...>
Fecha: Vie, 30 de Abr, 2004 6:40 pm
Asunto: [TEG] Prueba final de protocolo
edgardec2001
Sin conexión Sin conexión
Enviar correo Enviar correo
 
Adjunto el .st probado con éxito en la UTN , bajo Windows 2000.
Funciona bien, hay que ver si todavía hay errores de juego.

Agradezcan a Emilio que se dio cuenta que lo mande a la otra lista
Morph subclass: #DrawCard  instanceVariableNames: 'nombre deQuienSoy numero ' 
classVariableNames: ''  poolDictionaries: ''  category: 'Morphic-TEG'! 
!DrawCard methodsFor: 'initialization'! dibujaUnaCarta: t1 
 | t2 t3 t4 t5 | 
self numero: t1.  t4 _ #('Soldado1.jpg' 'Canon.jpg' 'Caballo.jpg' ).  t1 > 42 	
ifTrue: [t3 _ self top + 5. 		 t4 			 do: [:t6 | 
				 self 					 addMorph:
(DrawPicture new initializeWith: t6 escala: 0.7). 				 self submorphs first
center: self center. 				 self submorphs first top: t3. 				 t3 _ t3 + 40]] 	
ifFalse: [t5 _ t1 \\\ 3 + 1. 		 self 			 addMorphBack: (DrawPicture new 					
initializeWith: (t4 at: t5) 					 valor: t1 					 pos: self left + 20 @ self
center y). 		 t2 _ StringMorph contents: self nombre. 		 t2 center: self center.
t2 top: self top + 8. 		 self addMorphBack: t2]! !  !DrawCard methodsFor:
'initialization'! initialize  super initialize.  self setProperty: #dragEnabled
toValue: true.  self extent: 80 @ 120.  self color: Color lightGray.  self
borderColor: Color black.  self borderWidth: 2! !  !DrawCard methodsFor:
'initialization'! initializeOff  self addMorph: (Form fromFileNamed:
'TEGCarta.jpg') asMorph! !  !DrawCard methodsFor: 'initialization'! nombre: t1
limites: t2 
 | t3 t4 t5 |  nombre _ t1.  ejEnPais _ 0.  self 	 vertices: t2
asArray 	 color: Color white 	 borderWidth: 2 	 borderColor: Color black.  t4 _
self center.  t5 _ Morph new.  t5 	 bounds: (Rectangle 			 left: t4 x 			 right:
t4 x + 15 			 top: t4 y 			 bottom: t4 y + 10).  t5 color: Color white.  self
addMorph: t5.  t3 _ TextMorph new.  t3 autoFit: true.  t3 	 string: ejEnPais
asString 	 fontName: #ComicBold 	 size: 18 	 wrap: false.  t3 contents: ejEnPais
asString.  t3 bounds: t5.  t3 centered.  self addMorph: t3.  t3 lock! ! 
!DrawCard methodsFor: 'access'! deQuienSoy  ^ deQuienSoy! !  !DrawCard
methodsFor: 'access'! deQuienSoy: t1 
 deQuienSoy _ t1! !  !DrawCard methodsFor:
'access'! nombre  ^ nombre! !  !DrawCard methodsFor: 'access'! nombre: t1 
nombre _ t1! !  !DrawCard methodsFor: 'access'! numero  ^ numero! !  !DrawCard
methodsFor: 'access'! numero: t1 
 numero _ t1! ! 
 !DrawCard methodsFor: 'event
handling'! click: t1 
 ^ self! !  !DrawCard methodsFor: 'event handling'!
doubleClick: t1 
 submorphs first 	 ifNil: [^ 0].  submorphs first delete.  self
dibujaUnaCarta: numero! !  !DrawCard methodsFor: 'event handling'!
handlesMouseDown: t1 
 ^ true! !  !DrawCard methodsFor: 'event handling'!
mouseDown: t1 
 t1 hand waitForClicksOrDrag: self event: t1.  t1 hand grabMorph:
self! !  "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!  DrawCard
class  instanceVariableNames: ''!  !DrawCard class methodsFor: 'as yet
unclassified'! initializeOff  | t1 |  t1 _ self new.  FileDirectory default
pathParts last = 'STEG' 	 ifFalse: [TEGMain setFolder].  t1 addMorph: (Form
fromFileNamed: 'TEGCarta.jpg') asMorph.  ^ t1! ! 
 IconicButton subclass:
#DrawPicture  instanceVariableNames: 'estado valor '  classVariableNames: '' 
poolDictionaries: ''  category: 'Morphic-TEG'!  !DrawPicture methodsFor: 'as yet
unclassified'! estado  ^ estado! !  !DrawPicture methodsFor: 'as yet
unclassified'! estado: t1 
 | t2 |  estado _ t1.  estado 	 ifTrue: [t2 _
submorphs first form. 		 t2 mapColor: Color white to: Color lightRed] 	 ifFalse:
[t2 _ submorphs first form. 		 t2 mapColor: Color lightRed to: Color white]! ! 
!DrawPicture methodsFor: 'as yet unclassified'! initializeWith: t1 escala: t2 
| t3 |  t3 _ Form fromFileNamed: t1.  t3 _ t3 magnify: t3 boundingBox by: t2. 
self labelGraphic: t3! !  !DrawPicture methodsFor: 'as yet unclassified'!
initializeWith: t1 valor: t2 pos: t3 
 | t4 |  valor _ t2.  self estado: false. 
t4 _ Form fromFileNamed: t1.  self labelGraphic: t4.  self position: t3! ! 
!DrawPicture methodsFor: 'as yet unclassified'! initializeWith: t1 valor: t2
rect: t3 
 | t4 |  valor _ t2.  self estado: false.  t4 _ Form fromFileNamed:
t1.  self labelGraphic: t4.  self bounds: t3.  self comeToFront! !  !DrawPicture
methodsFor: 'as yet unclassified'! mouseUp: t1 
 (self containsPoint: t1
cursorPoint) 	 ifTrue: [self setSwitchState: estado = false. 		 self
doButtonAction] 	 ifFalse: [self setSwitchState: estado = true]! !  !DrawPicture
methodsFor: 'as yet unclassified'! setSwitchState: t1 
 t1 	 ifTrue: [self
borderColor: #inset. 		 self estado: true] 	 ifFalse: [self borderColor:
#raised. 		 self estado: false]! !  !DrawPicture methodsFor: 'as yet
unclassified'! valor  ^ valor! ! 
 Morph subclass: #InformaCartas 
instanceVariableNames: ''  classVariableNames: ''  poolDictionaries: '' 
category: 'Morphic-TEG'!  !InformaCartas methodsFor: 'initialization'!
initialize: t1 
 | t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 |  super initialize.  self 	
bounds: (Rectangle 			 left: 710 			 right: 748 			 top: 220 			 bottom: 460). 
self color: Color white.  self borderColor: Color black.  self borderWidth: 2. 
t2 _ t1 size.  t3 _ (216 / t2) asInteger.  t4 _ 224.  t5 _ 224 + t3.  t6 _ 237. 
t7 _ 247.  t3 _ t3 + 3.  1 	 to: t2 	 do: [:t12 | 
		 t8 _ Morph new. 		 t8 			
bounds: (Rectangle 					 left: 712 					 right: 748 					 top: t4 					 bottom:
t5). 		 t8 color: (t1 at: t12) miColor. 		 t8 borderColor: Color black. 		 t8
borderWidth: 2. 		 self addMorph: t8. 		 (t1 at: t12) vive 			 ifTrue: [t9 _
Morph new. 				 t9 					 bounds: (Rectangle 							 left: 720 							 right: 738
top: t6 							 bottom: t7). 				 t9 color: Color white. 				 t9 borderColor:
Color black. 				 t9 borderWidth: 2. 				 self addMorph: t9. 				 t10 _
StringMorph contents: (t1 at: t12) misCartas size asString. 				 t10 center: t9
center. 				 self addMorph: t10] 			 ifFalse: [t11 _ DrawPicture new 							
initializeWith: 'muerte.gif' 							 valor: 0 							 pos: t8 topLeft. 				 self
addMorph: t11]. 		 t4 _ t4 + t3. 		 t5 _ t5 + t3. 		 t6 _ t6 + t3. 		 t7 _ t7 +
t3].  self openInWorld! ! 
 Object subclass: #Jugador  instanceVariableNames:
'vive esHumano misPaises misCartas miColor '  classVariableNames: '' 
poolDictionaries: ''  category: 'Morphic-TEG'!  !Jugador methodsFor: 'accesing'!
esHumano  ^ esHumano! !  !Jugador methodsFor: 'accesing'! esHumano: t1 
esHumano _ t1! !  !Jugador methodsFor: 'accesing'! initialize  vive _ true. 
esHumano _ false.  misPaises _ OrderedCollection new.  misCartas _
OrderedCollection new! !  !Jugador methodsFor: 'accesing'! miColor  ^ miColor! !
!Jugador methodsFor: 'accesing'! miColor: t1 
 miColor _ t1! !  !Jugador
methodsFor: 'accesing'! misCartas  ^ misCartas! !  !Jugador methodsFor:
'accesing'! misCartas: t1 
 misCartas add: t1! !  !Jugador methodsFor:
'accesing'! misPaises  ^ misPaises! !  !Jugador methodsFor: 'accesing'!
misPaises: t1 
 misPaises add: t1! !  !Jugador methodsFor: 'accesing'! vive  ^
vive! !  !Jugador methodsFor: 'accesing'! vive: t1 
 vive _ t1! ! 

PolygonMorph subclass: #PaisMorph  instanceVariableNames: 'nombre ejEnPais
deQuienSoy instanciaTEG numero misLimites '  classVariableNames: '' 
poolDictionaries: ''  category: 'Morphic-TEG'!  !PaisMorph methodsFor:
'initialization'! initialize  instanciaTEG _ ActiveWorld submorphs 			 detect:
[:t1 | t1 class == TEGMain].  super initialize.  misLimites _ SortedCollection
new! !  !PaisMorph methodsFor: 'initialization'! nombre: t1 limites: t2 
 | t3
t4 t5 |  nombre _ t1.  ejEnPais _ 0.  self 	 vertices: t2 asArray 	 color: Color
white 	 borderWidth: 2 	 borderColor: Color black.  t4 _ self center.  t5 _
Morph new.  t5 	 bounds: (Rectangle 			 left: t4 x 			 right: t4 x + 15 			 top:
t4 y 			 bottom: t4 y + 10).  t5 color: Color white.  self addMorph: t5.  t3 _
TextMorph new.  t3 autoFit: true.  t3 	 string: ejEnPais asString 	 fontName:
#ComicBold 	 size: 18 	 wrap: false.  t3 contents: ejEnPais asString.  t3
bounds: t5.  t3 centered.  self addMorph: t3.  t3 lock! ! 
 !PaisMorph
methodsFor: 'event handling' stamp: 'edc 4/29/2004 10:24'! click: t1 
 | t2 t3 |
t2 _ 'Soy ' , nombre asString , ' numero ' , numero asString , 'y pertenezco a '
, deQuienSoy asString.  self showBalloon: t2 hand: t1 hand.  t3 _ 0. 
(instanciaTEG permitido: numero) 	 ifFalse: [^ false].  instanciaTEG submorphs 	
do: [:t4 | t4 class == DrawPicture 			 ifTrue: [t3 _ t3 + 1. 				 instanciaTEG
pone: instanciaTEG pone - 1. 				 t4 estado 					 ifTrue: [ejEnPais _ ejEnPais +
t4 valor. 						 t3 _ t3 - 1. 						 t4 delete]]].  self mostrar.  t3 = 1 	
ifTrue: [instanciaTEG ronda <= 5 			 ifTrue: [instanciaTEG continue] 			
ifFalse: [instanciaTEG estado: 2]]! !  !PaisMorph methodsFor: 'event handling'!
firstClickTimedOut: t1 
 | t2 t3 |  t2 _ owner rootForGrabOf: self.  t2 	 ifNil:
[t3 _ self copy. 		 self board owner owner addMorphFront: t3. 		 self world
displayWorld. 		 (Delay forMilliseconds: 750) wait. 		 t3 delete] 	 ifNotNil:
[t1 hand grabMorph: t2]! !  !PaisMorph methodsFor: 'event handling'!
handlesMouseDown: t1 
 ^ true! !  !PaisMorph methodsFor: 'event handling'!
mouseDown: t1 
 t1 hand waitForClicksOrDrag: self event: t1! !  !PaisMorph
methodsFor: 'event handling'! mouseEnter: t1 
 | t2 |  t2 _ 'Soy ' , nombre
asString , ' y pertenezco a ' , deQuienSoy asString.  self showBalloon: t2 hand:
t1 hand! ! 
 !PaisMorph methodsFor: 'access'! add: t1 
 ejEnPais _ ejEnPais +
t1.  self mostrar! !  !PaisMorph methodsFor: 'access'! deQuienSoy  ^ deQuienSoy!
!  !PaisMorph methodsFor: 'access'! deQuienSoy: t1 
 deQuienSoy _ t1! ! 
!PaisMorph methodsFor: 'access'! doubleClick: t1 
 1 	 to: 42 	 do: [:t2 |
(instanciaTEG submorphs at: t2) 			 color: Color white].  (instanciaTEG
submorphs at: numero) 	 color: Color green.  misLimites 	 do: [:t3 |
(instanciaTEG submorphs at: t3) 			 color: Color red].  self borderWidth: 4; 		
borderColor: Color red.  ^ self numero! !  !PaisMorph methodsFor: 'access'!
ejercitos  ^ ejEnPais! !  !PaisMorph methodsFor: 'access'! ejercitos: t1 
ejEnPais _ t1.  self mostrar! !  !PaisMorph methodsFor: 'access'! misLimites  ^
misLimites! !  !PaisMorph methodsFor: 'access'! misLimites: t1 
 misLimites _
t1! !  !PaisMorph methodsFor: 'access'! mostrar  submorphs first contents:
ejEnPais asString.  submorphs 	 do: [:t1 | t1 center: self center]! ! 
!PaisMorph methodsFor: 'access'! noMostrar  submorphs 	 do: [:t1 | t1 delete]! !
!PaisMorph methodsFor: 'access'! nombre  ^ nombre! !  !PaisMorph methodsFor:
'access'! numero  ^ numero! !  !PaisMorph methodsFor: 'access'! numero: t1 
numero _ t1! !  !PaisMorph methodsFor: 'access'! otroLimites: t1 
 misLimites _
misLimites add: t1! !  !PaisMorph methodsFor: 'access'! redrawInColor: t1 
 self
color: t1.  submorphs first contents: ejEnPais asString.  submorphs 	 do: [:t2 |
t2 center: self center]! ! 
 Object subclass: #TEGClient 
instanceVariableNames: 'socket serverName instanciaTEG '  classVariableNames: ''
poolDictionaries: ''  category: 'Morphic-TEG'!  !TEGClient methodsFor: 'as yet
unclassified' stamp: 'edc 4/27/2004 16:21'! initialize  | t1 |  Transcript open.
Transcript show: 'starting remote client'; 		 cr.  Transcript show:
'initializing network ... '.  Socket initializeNetwork.  Transcript show: 'ok';
cr.  serverName _ FillInTheBlank request: 'Type server name or IPAddress'
initialAnswer: 'Enterprise'.  t1 _ FillInTheBlank request: 'Type client name'
initialAnswer: ''.  Transcript show: 'server start to perform instructions'; 		
cr.  self newSocket. socket sendData: t1.  instanciaTEG _ ActiveWorld submorphs
detect: [:t2 | t2 class == TEGMain].  instanciaTEG activeSocket: self socket. 
instanciaTEG done: true! !  !TEGClient methodsFor: 'as yet unclassified'!
newSocket  socket _ Socket newTCP.  socket 	 connectTo: (NetNameResolver
addressForName: serverName) 	 port: 8000.  socket waitForConnectionUntil: Socket
standardDeadline! !  !TEGClient methodsFor: 'as yet unclassified' stamp: 'edc
4/27/2004 10:31'! socket ^ socket! !  "-- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- -- "!  TEGClient class  instanceVariableNames: ''!  !TEGClient class
methodsFor: 'as yet unclassified'! new  super new initialize! !  !TEGClient
class methodsFor: 'as yet unclassified'! start  super new initialize! ! 

BorderedMorph subclass: #TEGMain  instanceVariableNames: 'miArchivo cartasOrden
losJugadores jugadoresVivos cartel pone cambiosTotales playerTurn ronda limites
done lim estado numCarta mazo activeSocket serverOrClient socketList ' 
classVariableNames: 'NewFolder '  poolDictionaries: ''  category: 'Morphic-TEG'!
!TEGMain methodsFor: 'accessing' stamp: 'edc 4/26/2004 17:28'! activeSocket 
"Answer the value of activeSocket" 
 ^ activeSocket! !  !TEGMain methodsFor:
'accessing' stamp: 'edc 4/26/2004 17:28'! activeSocket: anObject  "Set the value
of activeSocket" 
 activeSocket _ anObject! !  !TEGMain methodsFor: 'accessing'
stamp: 'edc 4/26/2004 17:28'! cambiosTotales  "Answer the value of
cambiosTotales" 
 ^ cambiosTotales! !  !TEGMain methodsFor: 'accessing'!
cambiosTotales: t1 
 cambiosTotales _ t1! !  !TEGMain methodsFor: 'accessing'
stamp: 'edc 4/26/2004 17:28'! cartasOrden  "Answer the value of cartasOrden" 
 ^
cartasOrden! !  !TEGMain methodsFor: 'accessing'! cartasOrden: t1 
 cartasOrden
_ t1! !  !TEGMain methodsFor: 'accessing' stamp: 'edc 4/26/2004 17:28'! cartel 
"Answer the value of cartel" 
 ^ cartel! !  !TEGMain methodsFor: 'accessing'
stamp: 'edc 4/26/2004 17:28'! cartel: anObject  "Set the value of cartel" 
cartel _ anObject! !  !TEGMain methodsFor: 'accessing' stamp: 'edc 4/26/2004
17:28'! done  "Answer the value of done" 
 ^ done! !  !TEGMain methodsFor:
'accessing' stamp: 'edc 4/26/2004 17:28'! done: anObject  "Set the value of
done" 
 done _ anObject! !  !TEGMain methodsFor: 'accessing' stamp: 'edc
4/26/2004 17:28'! estado  "Answer the value of estado" 
 ^ estado! !  !TEGMain
methodsFor: 'accessing'! estado: t1 
 estado _ t1! !  !TEGMain methodsFor:
'accessing'! jugadoresVivos  ^ jugadoresVivos! !  !TEGMain methodsFor:
'accessing'! jugadoresVivos: t1 
 jugadoresVivos _ t1! !  !TEGMain methodsFor:
'accessing' stamp: 'edc 4/26/2004 17:28'! lim  "Answer the value of lim" 
 ^
lim! !  !TEGMain methodsFor: 'accessing' stamp: 'edc 4/26/2004 17:28'! lim:
anObject  "Set the value of lim" 
 lim _ anObject! !  !TEGMain methodsFor:
'accessing' stamp: 'edc 4/26/2004 17:28'! limites  "Answer the value of limites"
^ limites! !  !TEGMain methodsFor: 'accessing' stamp: 'edc 4/26/2004 17:28'!
limites: anObject  "Set the value of limites" 
 limites _ anObject! !  !TEGMain
methodsFor: 'accessing'! losJugadores  ^ losJugadores! !  !TEGMain methodsFor:
'accessing'! losJugadores: t1 
 losJugadores _ t1! !  !TEGMain methodsFor:
'accessing' stamp: 'edc 4/26/2004 17:28'! mazo  "Answer the value of mazo" 
 ^
mazo! !  !TEGMain methodsFor: 'accessing' stamp: 'edc 4/26/2004 17:28'! mazo:
anObject  "Set the value of mazo" 
 mazo _ anObject! !  !TEGMain methodsFor:
'accessing' stamp: 'edc 4/26/2004 17:28'! miArchivo  "Answer the value of
miArchivo" 
 ^ miArchivo! !  !TEGMain methodsFor: 'accessing' stamp: 'edc
4/26/2004 17:28'! miArchivo: anObject  "Set the value of miArchivo" 
 miArchivo
_ anObject! !  !TEGMain methodsFor: 'accessing' stamp: 'edc 4/26/2004 17:28'!
numCarta  "Answer the value of numCarta" 
 ^ numCarta! !  !TEGMain methodsFor:
'accessing'! numCarta: t1 
 numCarta _ t1! !  !TEGMain methodsFor: 'accessing'!
paises: t1 
 | t2 t3 |  1 	 to: 42 	 do: [:t4 | 
		 (submorphs at: t4) 			
ejercitos: ((t1 at: t4) 					 at: 1). 		 (submorphs at: t4) 			 deQuienSoy: ((t1
at: t4) 					 at: 2). 		 t2 _ (submorphs at: t4) deQuienSoy. 		 t3 _
(losJugadores at: t2) miColor. 		 (submorphs at: t4) 			 redrawInColor: t3]! ! 
!TEGMain methodsFor: 'accessing' stamp: 'edc 4/26/2004 17:28'! playerTurn 
"Answer the value of playerTurn" 
 ^ playerTurn! !  !TEGMain methodsFor:
'accessing'! playerTurn: t1 
 playerTurn _ t1! !  !TEGMain methodsFor:
'accessing'! pone  ^ pone! !  !TEGMain methodsFor: 'accessing'! pone: t1 
 pone
_ t1! !  !TEGMain methodsFor: 'accessing'! ronda  ^ ronda! !  !TEGMain
methodsFor: 'accessing'! ronda: t1 
 ronda _ t1! !  !TEGMain methodsFor:
'accessing' stamp: 'edc 4/26/2004 15:03'! serverOrClient  ^serverOrClient! ! 
!TEGMain methodsFor: 'accessing' stamp: 'edc 4/26/2004 14:57'! serverOrClient:
aChoice serverOrClient _ aChoice! !  !TEGMain methodsFor: 'accessing' stamp:
'edc 4/27/2004 15:13'! socketList: aDictionary socketList _ aDictionary. done _
true.! ! 
 !TEGMain methodsFor: 'as yet unclassified'! hacerListaPaises  | t1 t2
|  t1 _ Set new.  (losJugadores at: playerTurn) misPaises 	 do: [:t3 | limites
do: [:t4 | (t4 includes: t3) 					 ifTrue: [t1 add: t4]]].  t2 _ t1 copy.  t1 	
do: [:t5 | (((losJugadores at: playerTurn) misPaises 					 includes: (t5 at: 1))
and: [(losJugadores at: playerTurn) misPaises 						 includes: (t5 at: 2)]) 			
ifTrue: [t2 remove: t5]].  ^ t2! !  !TEGMain methodsFor: 'as yet unclassified'!
in: t1 pos1: t2 pos2: t3 
 | t4 t5 |  t4 _ (losJugadores at: playerTurn)
misPaises includes: t1.  t4 	 ifTrue: [t5 _ (losJugadores at: playerTurn)
misCartas at: t2. 		 (losJugadores at: playerTurn) misCartas 			 at: t2 			 put:
((losJugadores at: playerTurn) misCartas at: t3). 		 (losJugadores at:
playerTurn) misCartas at: t3 put: t5]! !  !TEGMain methodsFor: 'as yet
unclassified'! optimizarCambio  | t1 t2 t3 t4 t5 |  t5 _ Array new: 6. 
(losJugadores at: playerTurn) misCartas 	 do: [:t6 | t2 _ t6 \\\ 3 , self halt].
(losJugadores at: playerTurn) misCartas 	 do: [:t6 | ((losJugadores at:
playerTurn) misPaises includes: t6) 			 ifTrue: [t1 _ (losJugadores at:
playerTurn) misCartas indexOf: t6. 				 t2 _ t6 \\\ 3]].  t3 _ 0.  (losJugadores
at: playerTurn) misCartas 	 do: [:t7 | 
		 t3 _ t3 + 1. 		 t7 \\\ 3 = t2 			
ifTrue: [t4 _ (losJugadores at: playerTurn) misCartas at: t1. 				 (losJugadores
at: playerTurn) misCartas 					 at: t1 					 put: ((losJugadores at: playerTurn)
misCartas at: t3). 				 (losJugadores at: playerTurn) misCartas at: t3 put: t4.
^ true]. 		 nil]! ! 
 !TEGMain methodsFor: 'debug and other'! debug  submorphs 	
do: [:t1 | t1 class == DrawPicture 			 ifTrue: [t1 delete]].  17 	 to: 99 	 do:
[:t2 | 
		 pone _ t2. 		 self eligeEjercitos: t2 jugador: 1]! !  !TEGMain
methodsFor: 'debug and other'! maximo: t1 
 | t2 t3 t4 |  t1 	 do: [:t5 | t2 			
ifNil: [t3 _ t5 x. 				 t2 _ t5 x] 			 ifNotNil: [(t4 _ t5 x) > t2 					 ifTrue:
[t3 _ t5 x. 						 t2 _ t4]]].  ^ t2! !  !TEGMain methodsFor: 'debug and other'!
minimo: t1 
 | t2 t3 t4 |  t1 	 do: [:t5 | t2 			 ifNil: [t3 _ t5 x. 				 t2 _
t5 x] 			 ifNotNil: [(t4 _ t5 x) < t2 					 ifTrue: [t3 _ t5 x. 						 t2 _
t4]]].  ^ t2! !  !TEGMain methodsFor: 'debug and other'! split  self
eligeEjercitos: pone jugador: playerTurn! ! 
 !TEGMain methodsFor: 'event
handling'! handlesMouseDown: t1 
 ^ Smalltalk isMorphic not 	 or: [t1
yellowButtonPressed]! !  !TEGMain methodsFor: 'event handling'! mouseDown: t1 
| t2 |  t1 yellowButtonPressed 	 ifFalse: [^ self].  t2 _ MenuMorph new
defaultTarget: self.  self addMenuItemsTo: t2 hand: t1 hand.  t2 popUpEvent: t1
in: self world! ! 
 !TEGMain methodsFor: 'fileIn/out'! grabaEstado  | t1 |  t1 _
ReferenceStream fileNamed: 'estado.teg'.  t1 nextPut: losJugadores.  t1 nextPut:
cartasOrden.  t1 nextPut: jugadoresVivos.  t1 nextPut: playerTurn.  t1 nextPut:
ronda.  t1 nextPut: numCarta.  t1 nextPut: cambiosTotales.  1 	 to: 42 	 do:
[:t2 | 
		 t1 nextPut: (submorphs at: t2) ejercitos. 		 t1 nextPut: (submorphs
at: t2) deQuienSoy].  t1 close! !  !TEGMain methodsFor: 'fileIn/out'! leerEstado
| t1 |  t1 _ ReferenceStream fileNamed: 'estado.teg'.  losJugadores _ t1 next. 
cartasOrden _ t1 next.  jugadoresVivos _ t1 next.  playerTurn _ t1 next.  ronda
_ t1 next.  numCarta _ t1 next.  cambiosTotales _ t1 next.  1 	 to: 42 	 do:
[:t2 | 
		 (submorphs at: t2) 			 ejercitos: t1 next. 		 (submorphs at: t2) 			
deQuienSoy: t1 next].  t1 close.  self miColor! ! 
 !TEGMain methodsFor: 'game
sequence'! armaBatallones  | t1 t2 t3 t4 t5 t6 t7 |  t7 _ Array new: 5.  t1 _
pone.  t2 _ 0.  t3 _ 0.  t4 _ 0.  t5 _ 0.  t6 _ 0.  t2 _ (t1 / 50) asInteger. 
t1 _ t1 \\\ 50.  t3 _ (t1 / 20) asInteger.  t1 _ t1 \\\ 20.  t4 _ (t1 / 10)
asInteger.  t1 _ t1 \\\ 10.  t1 = 5 	 ifTrue: [t6 _ 5] 	 ifFalse: [t5 _ (t1 / 5)
asInteger. 		 t6 _ t1 \\\ 5].  pone <= 9 	 ifFalse: [[t2 + t3 + t4 + t5 + t6 <=
5] 			 whileTrue: [t4 > 0 					 ifTrue: [t4 _ t4 - 1. 						 t5 _ t5 + 2] 					
ifFalse: [t3 > 0 							 ifTrue: [t3 _ t3 - 1. 								 t4 _ t4 + 2] 							
ifFalse: [t2 > 0 									 ifTrue: [t2 _ t2 - 1. 										 t3 _ t3 + 2.
t4 _ t4 + 5] 									 ifFalse: [t5 > 0 											 ifTrue: [t5 _ t5 - 1.
t6 _ t6 + 5]]]]]].  t7 at: 1 put: t6.  t7 at: 2 put: t5.  t7 at: 3 put: t4.  t7
at: 4 put: t3.  t7 at: 5 put: t2.  ^ t7! !  !TEGMain methodsFor: 'game
sequence'! atacaMaquina  | t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 |  t10 _ self
hacerListaPaises: true.  t10 	 do: [:t11 | 
		 ((losJugadores at: playerTurn)
misPaises 				 includes: (t11 at: 1)) 			 ifTrue: [t7 _ t11 at: 1. 				 t6 _ t11
at: 2] 			 ifFalse: [t7 _ t11 at: 2. 				 t6 _ t11 at: 1]. 		 t1 			 ifNil: [t1
_ (submorphs at: t7) ejercitos - (submorphs at: t6) ejercitos. 				 t2 _ t7] 			
ifNotNil: [(t3 _ (submorphs at: t7) ejercitos - (submorphs at: t6) ejercitos) >
t1 					 ifTrue: [t2 _ t7. 						 t8 _ t6. 						 t1 _ t3]]].  t8 	 ifNil: [^
false].  t6 _ t8.  t7 _ t2.  t4 _ self 			 suerte: (submorphs at: t7) 			
contra: (submorphs at: t6).  t4 	 ifTrue: [pone > 2 			 ifTrue: [t5 _ (pone - 2
/ 2) asInteger. 				 t9 _ pone - t5. 				 (submorphs at: t7) 					 add: t9. 				
(submorphs at: t6) 					 add: t5. 				 (submorphs at: t6) 					 deQuienSoy:
playerTurn. 				 ^ true]. 		 ^ false].  ^ false! !  !TEGMain methodsFor: 'game
sequence'! ataque  | t1 t2 t3 t4 t5 |  estado _ 2.  Cursor crossHair 	
showWhile: [[Sensor anyButtonPressed] 			 whileFalse: [self currentWorld
displayWorldSafely; runStepMethods]. 		 t1 _ Sensor cursorPoint].  t3 _
submorphs 			 detect: [:t6 | t6 containsPoint: t1].  t2 _ t3 nombre.  PopUpMenu
confirm: t2.  ((losJugadores at: playerTurn) misPaises includes: t3 numero) 	
ifFalse: [^ self].  Cursor crossHair 	 showWhile: [[Sensor anyButtonPressed] 			
whileFalse: [self currentWorld displayWorldSafely; runStepMethods]. 		 t1 _
Sensor cursorPoint].  t4 _ submorphs 			 detect: [:t6 | t6 containsPoint: t1]. 
lim _ Array new: 2.  lim at: 1 put: t3 numero.  lim at: 2 put: t4 numero. 
(limites includes: lim) 	 ifFalse: [lim at: 1 put: t4 numero. 		 lim at: 2 put:
t3 numero. 		 (limites includes: lim) 			 ifFalse: [PopUpMenu inform: 'No son
limitrofes'. 				 ^ false]].  t5 _ self suerte: t3 contra: t4.  t5 	 ifTrue:
[self eligeEjercitos: pone jugador: playerTurn. 		 estado _ 3]! !  !TEGMain
methodsFor: 'game sequence'! continue  done _ true! !  !TEGMain methodsFor:
'game sequence'! continue: t1 
 t1 delete.  estado _ 4! !  !TEGMain methodsFor:
'game sequence'! dibuCartas: t1 hayCambio: t2 
 | t3 t4 t5 t6 t7 t8 t9 |  t3 _
(Form fromFileNamed: 'CardsDLOG.gif') asMorph.  t7 _ DrawPicture new 			
initializeWith: 'OK.gif' 			 valor: 1 			 rect: (463 @ 327 corner: 535 @ 358). 
t7 target: self.  t7 actionSelector: #cambiaCartas:.  t7 	 arguments: (Array
with: t3).  t9 _ DrawPicture new 			 initializeWith: 'Cancel.gif' 			 valor: 1
rect: (468 @ 292 corner: 530 @ 314).  t9 target: self.  t9 actionSelector:
#continue:.  t9 	 arguments: (Array with: t3).  t3 position: 90 @ 90.  t3
openInWorld.  1 	 to: t1 	 do: [:t10 | 
		 t10 caseOf: { 			 [1] -> [t6 _ 110 @
110]. 			 [2] -> [t6 _ 286 @ 110]. 			 [3] -> [t6 _ 462 @ 110]. 			 [4] -> [t6 _
198 @ 254]. 			 [5] -> [t6 _ 374 @ 254]. 			 [6] -> [t6 _ 110 @ 254]} 				
otherwise: [t6 _ 20 @ 20]. 		 t8 _ (losJugadores at: playerTurn) misCartas at:
t10. 		 t8 > 42 			 ifTrue: [t4 _ DrawCard new dibujaUnaCarta: t8] 			 ifFalse:
[t4 _ mazo at: t8. 				 t4 submorphs last noMostrar. 				 t4 submorphs last
color: (submorphs at: t8) color]. 		 t10 <= 3 			 ifTrue: [t2 					 ifTrue: [t4
submorphs first estado: true]]. 		 t4 position: t6. 		 t3 addMorphBack: t4].  t3
addMorphBack: t7.  t3 addMorphBack: t9.  self world displayWorld.  (losJugadores
at: playerTurn) esHumano 	 ifTrue: [t2 			 ifTrue: [[estado = 4] 					
whileFalse: [World doOneCycle]]. 		 estado _ 1] 	 ifFalse: [3 			 timesRepeat:
[(Delay forSeconds: 1) wait. 				 SampledSound playSoundNamed: 'chirp'. 				 t2
ifTrue: [self cambiaCartas: t3]. 				 t5 _ true. 				 (Delay forSeconds: 3)
wait. 				 t3 delete. 				 ^ t5]]! !  !TEGMain methodsFor: 'game sequence'
stamp: 'edc 4/29/2004 11:38'! dibujaUnaCarta2: t1 
 | t2 t3 t4 | (losJugadores
at: playerTurn) esHumano ifFalse:[^self].  t1 openInWorld.  t1 center: Display
center.  t2 _ Player new.  t2 costume: t1.  t3 _ 1.0.  t2 show.  1 	 to: 8 	 do:
[:t5 | 
		 t4 _ 1600 - (100 * t5). 		 (Delay forMilliseconds: t4) wait. 		
"FMSound randomWeird1 play." 		 t2 setScaleFactor: t3. 		 t2 forward: 100
atRandom. 		 t2 turn: 360 atRandom. 		 self world displayWorld. 		 t3 _ t3 -
0.125].  t2 erase! !  !TEGMain methodsFor: 'game sequence' stamp: 'edc 4/27/2004
14:41'! eligeEjercitos: t1 jugador: t2 
 | t3 t4 t5 t6 t7 t8 t9 t10 t11 t14 | 
t10 _ Array new: 9.  t9 _ Array new: 9.  1 	 to: 9 	 do: [:t12 | 
		 t10 			 at:
t12 			 put: (Rectangle 					 left: 155 + (t12 * 45) 					 right: 195 + (t12 *
45) 					 top: (self bottom - 70) 					 bottom: (self bottom - 50)). 		 t9 at:
t12 put: 0].  t11 _ self armaBatallones.  t8 _ 1.  t7 _ t11 at: 1.  t6 _ t11 at:
2.  t5 _ t11 at: 3.  t4 _ t11 at: 4.  t3 _ t11 at: 5.  t7 > 0 	 ifTrue: [1 			
to: t7 			 do: [:t13 | 
				 t8 _ t8 + 1. 				 self 					 addMorphBack:
(DrawPicture new 							 initializeWith: 'Soldado1.gif' 							 valor: 1 							
rect: (t10 at: t13)). 				 t9 at: t13 put: 1]].  t6 > 0 	 ifTrue: [t14 _ t6 + t8
- 1. 		 t8 			 to: t14 			 do: [:t13 | 
				 t8 _ t8 + 1. 				 self 					
addMorphBack: (DrawPicture new 							 initializeWith: 'Soldado5.gif' 							
valor: 5 							 rect: (t10 at: t13)). 				 t9 at: t13 put: 5]].  t5 > 0 	
ifTrue: [t14 _ t5 + t8 - 1. 		 t8 			 to: t14 			 do: [:t13 | 
				 t8 _ t8 + 1.
self 					 addMorphBack: (DrawPicture new 							 initializeWith:
'Soldado10.gif' 							 valor: 10 							 rect: (t10 at: t13)). 				 t9 at: t13
put: 10]].  t4 > 0 	 ifTrue: [t14 _ t4 + t8 - 1. 		 t8 			 to: t14 			 do: [:t13
| 
				 t8 _ t8 + 1. 				 self 					 addMorphBack: (DrawPicture new 							
initializeWith: 'Soldado20.gif' 							 valor: 20 							 rect: (t10 at: t13)).
t9 at: t13 put: 20]].  t3 > 0 	 ifTrue: [t14 _ t3 + t8 - 1. 		 t8 			 to: t14
do: [:t13 | 
				 t8 _ t8 + 1. 				 self 					 addMorphBack: (DrawPicture new
initializeWith: 'Soldado50.gif' 							 valor: 50 							 rect: (t10 at: t13)).
t9 at: t13 put: 50]].  (t9 at: 9) 		 = 0 	 ifTrue: [self addMorphBack:
(DrawPicture new 				 initializeWith: 'Split.gif' 				 valor: 0 				 rect: (t10
at: 9); 					 target: self; 					 actionSelector: #split)]! !  !TEGMain
methodsFor: 'game sequence'! endGameFor: t1 
 ^ self halt! !  !TEGMain
methodsFor: 'game sequence'! finAtaque  done _ true.  estado _ 3! !  !TEGMain
methodsFor: 'game sequence' stamp: 'edc 4/27/2004 14:41'! finRonda  ronda _
ronda + 1.  cartel newContents: 'Ronda ' , ronda asString.  cartel center: self
center.  cartel top: self top + 10! !  !TEGMain methodsFor: 'game sequence'!
fortificar  | t1 t2 t3 t4 |  estado _ 2.  Cursor crossHair 	 showWhile: [[Sensor
anyButtonPressed] 			 whileFalse: [self currentWorld displayWorldSafely;
runStepMethods]. 		 t1 _ Sensor cursorPoint].  t2 _ submorphs 			 detect: [:t5 |
t5 containsPoint: t1].  ((losJugadores at: playerTurn) misPaises includes: t2
numero) 	 ifFalse: [^ self].  t4 _ t2 nombre.  PopUpMenu confirm: t4.  Cursor
crossHair 	 showWhile: [[Sensor anyButtonPressed] 			 whileFalse: [self
currentWorld displayWorldSafely; runStepMethods]. 		 t1 _ Sensor cursorPoint]. 
t3 _ submorphs 			 detect: [:t5 | t5 containsPoint: t1].  ((losJugadores at:
playerTurn) misPaises includes: t3 numero) 	 ifFalse: [self halt].  lim _ Array
new: 2.  lim at: 1 put: t2 numero.  lim at: 2 put: t3 numero.  (limites
includes: lim) 	 ifFalse: [lim at: 1 put: t3 numero. 		 lim at: 2 put: t2
numero. 		 (limites includes: lim) 			 ifFalse: [PopUpMenu inform: 'No son
limitrofes'. 				 ^ false]].  pone _ t2 ejercitos - 1.  t2 ejercitos: 1.  self
eligeEjercitos: pone jugador: playerTurn! !  !TEGMain methodsFor: 'game
sequence'! fortificarMaquina  | t1 t2 t3 t4 t5 t6 |  t1 _ OrderedCollection new.
t3 _ (losJugadores at: playerTurn) misPaises asSortedCollection.  t3 	 do: [:t7
| 
		 t2 _ false. 		 (submorphs at: t7) misLimites 			 do: [:t8 | (t3 includes:
t8) 					 ifFalse: [t2 _ true]]. 		 t2 			 ifFalse: [(submorphs at: t7)
ejercitos even 					 ifTrue: [t4 _ (submorphs at: t7) ejercitos - 2. 						
(submorphs at: t7) 							 ejercitos: 2] 					 ifFalse: [t4 _ (submorphs at: t7)
ejercitos - 1. 						 (submorphs at: t7) 							 ejercitos: 1]. 				 t5 _
(submorphs at: t7) misLimites size. 				 t6 _ (t4 / t5) asInteger. 				
(submorphs at: t7) misLimites 					 do: [:t9 | (submorphs at: t9) 							 add:
t6]]]! !  !TEGMain methodsFor: 'game sequence'! hacerLimites  | t1 |  1 	 to: 42
do: [:t2 | 
		 t1 _ limites 					 select: [:t3 | t3 includes: t2] 					
thenCollect: [:t4 | (t4 at: 2) 								 ~= t2 							 ifTrue: [t4 at: 2] 							
ifFalse: [t4 at: 1]]. 		 (submorphs at: t2) 			 misLimites: t1].  1 	 to: 42 	
do: [:t5 | (submorphs at: t5) 			 color: Color white]! !  !TEGMain methodsFor:
'game sequence'! leerCartas  | t1 t2 |  mazo _ OrderedCollection new.  t1 _
ReferenceStream fileNamed: 'cartas.teg'.  1 	 to: 42 	 do: [:t3 | 
		 t2 _ t1
next. 		 (t2 submorphs at: 3) lock. 		 mazo add: t2].  t1 close! !  !TEGMain
methodsFor: 'game sequence' stamp: 'edc 4/29/2004 10:00'! makeMove 
[jugadoresVivos > 1] 	 whileTrue: [submorphs 			 do: [:t1 | t1 class ==
DrawPicture 					 ifTrue: [t1 delete]]. 		 (losJugadores at: playerTurn) vive
ifFalse: [playerTurn _ playerTurn \\ 6 + 1]. 		 cartel color: (losJugadores at:
playerTurn) miColor. 		 cartel newContents: 'Ronda ' , ronda asString , ' Turno
del jugador ' , playerTurn asString. 		 cartel center: self center. 		 cartel
top: self top + 10. 		 done _ false. 		 estado _ 1. 		 (losJugadores at:
playerTurn) esHumano & (serverOrClient = #server) 			 ifTrue: [self
sendMyData.done _ true]. 		 ronda caseOf: { 			 [1] -> [pone _ 5]. 			 [2] ->
[pone _ 4]. 			 [3] -> [pone _ 3]. 			 [4] -> [pone _ 1]. 			 [5] -> [pone _ 1]}
otherwise: [pone _ self cuantosEjercitos]. 		 (losJugadores at: playerTurn)
misCartas size >= 3 			 ifTrue: [self verCartas]. 		 (losJugadores at:
playerTurn) esHumano & (serverOrClient = #cliente) 			 ifTrue: [self
eligeEjercitos: pone jugador: playerTurn]. 		 (losJugadores at: playerTurn)
esHumano not & (serverOrClient = #server) 			 ifTrue: [self maquinaPone]. 		
"ifFalse: [(losJugadores at: playerTurn) misPaises size = 0 
		 ifTrue: [self
muerte]" 		 ronda > 5 			 ifTrue: [submorphs last class == InformaCartas 					
ifTrue: [submorphs last delete] 					 ifFalse: [self 							 addMorphBack:
(InformaCartas new initialize: losJugadores)]]. 		 [done] 			 whileFalse: [World
doOneCycle]. 		 ((losJugadores at: playerTurn) esHumano 				 and: [estado = 3])
ifTrue: [self obtenerCarta]. 		 playerTurn = 6 			 ifTrue: [ronda _ ronda + 1].
serverOrClient = #cliente 			 ifTrue: [self sendMyData] 			 ifFalse: [playerTurn
_ playerTurn \\ 6 + 1]. 		 self world displayWorld]! !  !TEGMain methodsFor:
'game sequence'! maquinaPone  | t1 t2 t3 t4 |  t2 _ (losJugadores at:
playerTurn) misPaises size.  t1 _ 1.  [pone > 0] 	 whileTrue: [t3 _
(losJugadores at: playerTurn) misPaises at: t1. 		 (submorphs at: t3) 			 add:
1. 		 pone _ pone - 1. 		 t1 _ t1 + 1. 		 t1 > t2 			 ifTrue: [t1 _ 1]].  ronda
> 5 	 ifTrue: [t4 _ self atacaMaquina. 		 t4 			 ifTrue: [self obtenerCarta]. 		
self fortificarMaquina].  done _ true! !  !TEGMain methodsFor: 'game sequence'!
muerte  (losJugadores at: playerTurn) 	 vive: false.  jugadoresVivos _
jugadoresVivos - 1.  done _ true! !  !TEGMain methodsFor: 'game sequence'!
obtenerCarta  | t1 |  numCarta < 45 	 ifTrue: [t1 _ cartasOrden at: numCarta. 		
(losJugadores at: playerTurn) 			 misCartas: t1. 		 t1 > 42 			 ifTrue: [self
dibujaUnaCarta2: (DrawCard new dibujaUnaCarta: t1)] 			 ifFalse: [self 					
dibujaUnaCarta2: (mazo at: t1)]].  numCarta _ numCarta + 1! !  !TEGMain
methodsFor: 'game sequence'! permitido: t1 
 estado = 1 	 ifTrue:
[((losJugadores at: playerTurn) misPaises includes: t1) 			 ifTrue: [^ true]]. 
estado = 2 | (estado = 3) 	 ifTrue: [(lim includes: t1) 			 ifTrue: [^ true]]. 
^ false! !  !TEGMain methodsFor: 'game sequence'! ponerEjercitos: t1 enPais: t2
ejEnPais at: t2 put: (ejEnPais at: t2) 		 + t1! !  !TEGMain methodsFor: 'game
sequence' stamp: 'edc 4/29/2004 11:17'! suerte: paisAtacante contra: paisAcacado
"self soundEffects."  | dadoAtaque dadoDefensa elColor |  cartel newContents:
paisAtacante nombre , ' Ataca a ' , paisAcacado nombre.  cartel center: self
center.  cartel top: self top + 10.  cartel color: (losJugadores at: playerTurn)
miColor.  self world displayWorld.  "(Delay forSeconds: 3) wait."  [paisAtacante
ejercitos > 0 	 and: [paisAcacado ejercitos > 0]] 	 whileTrue: [dadoAtaque _ 0.
dadoDefensa _ 0. 		 [dadoAtaque = dadoDefensa] 			 whileTrue: [dadoAtaque _ 6
atRandom. 				 dadoDefensa _ 6 atRandom]. 		 dadoAtaque > dadoDefensa 			
ifTrue: [paisAcacado ejercitos: paisAcacado ejercitos - 1] 			 ifFalse:
[paisAtacante ejercitos: paisAtacante ejercitos - 1]].  paisAcacado ejercitos =
0 	 ifTrue: [elColor _ (losJugadores at: playerTurn) miColor. 		 paisAcacado
color: elColor. 		 (losJugadores at: paisAcacado deQuienSoy) misPaises 			
remove: paisAcacado numero 			 ifAbsent: []. 		 paisAcacado deQuienSoy:
playerTurn. 		 (losJugadores at: paisAcacado deQuienSoy) misPaises size = 0 			
ifTrue: [self muerte]. 		 paisAcacado deQuienSoy: playerTurn. 		 (losJugadores
at: playerTurn) 			 misPaises: paisAcacado numero] 	 ifFalse: [^ false]. 
paisAtacante ejercitos > 2 	 ifTrue: [paisAcacado ejercitos: 2. 		 pone _
paisAtacante ejercitos - 2. 		 paisAtacante ejercitos: 0. 		 ^ true] 	 ifFalse:
[pone _ 0. 		 ^ false].  self halt! !  !TEGMain methodsFor: 'game sequence'!
verCartas  | t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 |  t1 _ 0.  t2 _ 0.  t3 _ 0.  t4 _
0.  t5 _ 0.  t6 _ 0.  t7 _ 0.  t4 _ 0.  t8 _ false.  1 	 to: (losJugadores at:
playerTurn) misCartas size 	 do: [:t11 | 
		 t10 _ (losJugadores at: playerTurn)
misCartas at: t11. 		 t10 >= 43 			 ifTrue: [t4 _ t4 + 1]. 		 t9 _
((losJugadores at: playerTurn) misCartas at: t11) 					 \\\ 3. 		 t9 caseOf: {
[0] -> 
				 [t1 _ t1 + 1. 				 t5 = 0 					 ifTrue: [t5 _ t11. 						 t4 _ t4 +
1] 					 ifFalse: [self 							 in: t10 							 pos1: t11 							 pos2: t5]].
[1] -> 
				 [t2 _ t2 + 1. 				 t6 = 0 					 ifTrue: [t6 _ t11. 						 t4 _ t4 +
1] 					 ifFalse: [self 							 in: t10 							 pos1: t11 							 pos2: t6]].
[2] -> 
				 [t3 _ t3 + 1. 				 t7 = 0 					 ifTrue: [t7 _ t11. 						 t4 _ t4 +
1] 					 ifFalse: [self 							 in: t10 							 pos1: t11 							 pos2: t7]]}
otherwise: [Transcript open]].  t1 >= 3 | (t2 >= 3) | (t3 >= 3) | (t4 >= 3) 	
ifTrue: [t8 _ true].  (losJugadores at: playerTurn) misCartas size > 3 	 ifTrue:
[t8 			 ifTrue: [self optimizarCambio]].  t8 	 ifTrue: [self dibuCartas:
(losJugadores at: playerTurn) misCartas size hayCambio: t8]! ! 
 !TEGMain
methodsFor: 'initialization'! cuantosEjercitos  | t1 t2 t3 t4 t5 t6 t7 |  t1 _
0.  t2 _ 0.  t3 _ 0.  t4 _ 0.  t5 _ 0.  t6 _ 0.  t7 _ 0.  1 	 to: 42 	 do: [:t8
| (submorphs at: t8) deQuienSoy = playerTurn 			 ifTrue: [t1 _ t1 + 1. 				 (t8
>= 1 						 and: [t8 <= 4]) 					 ifTrue: [t2 _ t2 + 1]. 				 (t8 >= 5 						
and: [t8 <= 12]) 					 ifTrue: [t3 _ t3 + 1]. 				 (t8 >= 13 						 and: [t8 <=
20]) 					 ifTrue: [t4 _ t4 + 1]. 				 (t8 >= 21 						 and: [t8 <= 33]) 					
ifTrue: [t5 _ t5 + 1]. 				 (t8 >= 34 						 and: [t8 <= 37]) 					 ifTrue: [t6
_ t6 + 1]. 				 (t8 > 38 						 and: [t8 < 42]) 					 ifTrue: [t7 _ t7 + 1]]]. 
t1 _ 1 + (t1 / 3) asInteger.  (t2 = 4 		 or: [t6 = 4]) 	 ifTrue: [t1 _ t1 + 2]. 
(t3 = 7 		 or: [t4 = 7]) 	 ifTrue: [t1 _ t1 + 5].  t5 = 8 	 ifTrue: [t1 _ t1 +
7].  t7 = 5 	 ifTrue: [t1 _ t1 + 3].  t1 < 3 	 ifTrue: [t1 _ 3].  ^ t1! ! 
!TEGMain methodsFor: 'initialization'! dibujaRegion2: t1 color: t2 
 (miRegion
at: t1) 	 color: t2! !  !TEGMain methodsFor: 'initialization'! distribuyePaises 
| t1 t2 t3 t4 t5 |  t2 _ 42 / jugadoresVivos.  t3 _ OrderedCollection new.  [t3
size < 42] 	 whileTrue: [(t3 includes: (t1 _ 42 atRandom)) 			 ifFalse: [t3 add:
t1]].  t4 _ 1.  1 	 to: jugadoresVivos 	 do: [:t6 | 1 			 to: t2 			 do: [:t7 |
t5 _ t3 at: t4. 				 (losJugadores at: t6) 					 misPaises: t5. 				 (submorphs
at: t5) 					 deQuienSoy: t6. 				 t4 _ t4 + 1]]! !  !TEGMain methodsFor:
'initialization'! elijeColor  | t1 t2 t3 |  t1 _ Array new: 16.  t1 	 at: 1 	
put: (Color 			 r: 1.0 			 g: 5000 / 65535 			 b: 5000 / 65535).  t1 	 at: 2 	
put: (Color 			 r: 1.0 			 g: 25000 / 65535 			 b: 5000 / 65535).  t1 	 at: 3 	
put: (Color 			 r: 1.0 			 g: 45000 / 65535 			 b: 5000 / 65535).  t1 	 at: 4 	
put: (Color 			 r: 65000 / 65535 			 g: 65000 / 65535 			 b: 25000 / 65535).  t1
at: 5 	 put: (Color 			 r: 65000 / 65535 			 g: 65000 / 65535 			 b: 500 /
65535).  t1 	 at: 6 	 put: (Color 			 r: 45000 / 65535 			 g: 45000 / 65535 			
b: 500 / 65535).  t1 	 at: 7 	 put: (Color 			 r: 25000 / 65535 			 g: 25000 /
65535 			 b: 500 / 65535).  t1 	 at: 8 	 put: (Color 			 r: 5000 / 65535 			 g:
65535 / 65535 			 b: 20000 / 65535).  t1 	 at: 9 	 put: (Color 			 r: 5000 /
65535 			 g: 65535 / 65535 			 b: 65535 / 65535).  t1 	 at: 10 	 put: (Color 			
r: 5000 / 65535 			 g: 45000 / 65535 			 b: 65535 / 65535).  t1 	 at: 11 	 put:
(Color 			 r: 5000 / 65535 			 g: 25000 / 65535 			 b: 65535 / 65535).  t1 	 at:
12 	 put: (Color 			 r: 5000 / 65535 			 g: 5000 / 65535 			 b: 65535 / 65535). 
t1 	 at: 13 	 put: (Color 			 r: 1.0 			 g: 5000 / 65535 			 b: 25000 / 65535). 
t1 	 at: 14 	 put: (Color 			 r: 1.0 			 g: 5000 / 65535 			 b: 45000 / 65535). 
t1 	 at: 15 	 put: (Color 			 r: 1.0 			 g: 5000 / 65535 			 b: 65000 / 65535). 
t1 	 at: 16 	 put: (Color 			 r: 45000 / 65535 			 g: 5000 / 65535 			 b: 65535
/ 65535).  t2 _ AlignmentMorph newColumn.  t3 _ OrderedCollection new.  1 	 to:
16 	 do: [:t4 | t3 add: (SimpleButtonMorph new label: 'Color '; 					
				
color: (t1 at: t4); 					 target: self; 					 actionSelector: #miColor:;
arguments: (Array 						 with: (t1 at: t4)))].  t3 	 reverseDo: [:t5 | t2
addMorph: t5].  t2 position: 650 @ 30.  self addMorph: t2.  cartel _ t2! ! 
!TEGMain methodsFor: 'initialization'! informaCartas  self halt.  self 	
addMorphBack: (InformaCartas new initialize: losJugadores)! !  !TEGMain
methodsFor: 'initialization'! initialize  | t1 t2 t3 t4 |  self setFolder. 
(StreamingMP3Sound onFileNamed: NewFolder pathName , FileDirectory slash ,
'combat.mp3') play.  super initialize.  self remoteCommServer.  self extent: 750
@ 490.  self color: Color paleBlue.  self borderWidth: 2.  self position: 18 @
0.  self toggleStickiness.  self openInWorld.  miArchivo _ FileStream
readOnlyFileNamed: 'PRUEBA'.  cartasOrden _ OrderedCollection new.  [cartasOrden
size < 44] 	 whileTrue: [(cartasOrden includes: (t4 _ 44 atRandom)) 			 ifFalse:
[cartasOrden add: t4]].  losJugadores _ Array new: 6.  1 	 to: 6 	 do: [:t5 |
losJugadores at: t5 put: Jugador new initialize].  (losJugadores at: 1) 	
esHumano: true.  jugadoresVivos _ 6.  1 	 to: 42 	 do: [:t6 | 
		 t2 _ String
new. 		 t2 _ self leerArchivo. 		 t3 _ OrderedCollection new. 		 t1 _ Point
readFromString: self leerArchivo. 		 t3 add: t1. 		 10 			 timesRepeat: [t1 _
Point readFromString: self leerArchivo. 				 t3 add: t1]. 		 self addMorphBack:
(PaisMorph new nombre: t2 limites: t3; 					 numero: t6)].  self
distribuyePaises.  self miColor.  ronda _ 1.  estado _ 1.  numCarta _ 1. 
playerTurn _ 1.  cambiosTotales _ 0.  self initialize2! !  !TEGMain methodsFor:
'initialization' stamp: 'edc 4/27/2004 16:27'! initialize2  | t1 t2 t3 t4 | 
limites _ #(#(1 2) #(1 3) #(2 3) #(2 4) #(3 2) #(3 4) #(3 38) #(4 3) #(4 5) #(5
6) #(5 7) #(6 5) #(6 7) #(6 9) #(6 10) #(7 8) #(7 9) #(8 9) #(8 11) #(8 12) #(9
10) #(9 12) #(10 13) #(11 27) #(12 13) #(13 14) #(14 15) #(14 18) #(15 16) #(15
18) #(15 19) #(16 17) #(16 20) #(16 20) #(16 21) #(16 22) #(16 23) #(17 19) #(18
19) #(19 38) #(20 16) #(20 21) #(20 23) #(20 38) #(20 39) #(21 25) #(22 23) #(22
24) #(22 29) #(23 24) #(23 39) #(23 40) #(24 33) #(25 21) #(25 29) #(29 33) #(33
29) #(38 39) #(38 40) #(38 41) #(40 41) #(20 23) #(19 20) #(39 40) #(25 26) #(26
27) #(31 32) #(27 32) #(30 32) #(29 30) #(34 35) #(37 35) #(35 36) #(11 12) #(40
42) #(42 41) #(34 37) #(36 37) #(33 34) #(24 29) #(28 30) #(25 30) #(18 17) #(18
19) #(17 20) #(21 22) #(21 29) #(25 28) #(26 28) #(26 31) #(28 31) #(30 31) ). 
t1 _ SimpleButtonMorph new label: 'Ataque'; 				 target: self; 				
actionSelector: #ataque; 				 position: 180 @ 460; 				 bottom: self bottom -
20.  self addMorphBack: t1.  t1 _ SimpleButtonMorph new label: 'Fin Ataque';
target: self; 				 actionSelector: #finAtaque; 				 position: 280 @ 460; 				
bottom: self bottom - 20.  self addMorphBack: t1.  t2 _ SimpleButtonMorph new
label: 'Continuar'; 				 target: self; 				 actionSelector: #continue; 				
position: 380 @ 460; 				 bottom: self bottom - 20.  self addMorphBack: t2.  t3
_ SimpleButtonMorph new label: 'Fortificar'; 				 target: self; 				
actionSelector: #fortificar; 				 position: 480 @ 460; 				 bottom: self bottom
- 20.  self addMorphBack: t3.  t4 _ SimpleButtonMorph new label: 'DEBUG'; 				
target: self; 				 actionSelector: #debug; 				 position: 580 @ 460; 				
bottom: self bottom - 20.  self addMorphBack: t4.  done _ true.  cartel _
TextMorph borderedPrototype.  cartel 	 beAllFont: (StrikeFont familyName:
#ComicBold size: 18).  cartel color: Color red.  cartel newContents: 'SqueakRos
fight the evil '.  cartel extent: self width - 30 @ 40.  cartel center: self
center.  cartel top: self top + 10.  self addMorphBack: cartel.  World
displayWorldSafely.  (Delay forSeconds: 5) wait.  self leerCartas.  self
startStepping.  done _ false.  self serverOrClient = #server 	 ifTrue:
[TEGServer start] 	 ifFalse: [TEGClient start. [activeSocket dataAvailable]
whileFalse. 	
 self askMyData].  [done] whileFalse.  self makeMove! !  !TEGMain
methodsFor: 'initialization' stamp: 'edc 4/29/2004 11:44'! initializeN  | t1 | 
ScreenController new fullScreenOn.  cartasOrden _ OrderedCollection new. 
[cartasOrden size < 44] 	 whileTrue: [(cartasOrden includes: (t1 _ 44 atRandom))
ifFalse: [cartasOrden add: t1]].  losJugadores _ Array new: 6.  1 	 to: 6 	 do:
[:t2 | losJugadores at: t2 put: Jugador new initialize].  (losJugadores at: 1) 	
esHumano: true.  (losJugadores at: 2) 	 esHumano: true. (losJugadores at: 3) 	
esHumano: true.  jugadoresVivos _ 6.  serverOrClient = #server 	 ifTrue: [self
distribuyePaises. 		 self miColor].  ronda _ 1.  estado _ 1.  numCarta _ 1. 
playerTurn _ 1.  cambiosTotales _ 0.  self initialize2! !  !TEGMain methodsFor:
'initialization'! initializeP  | t1 t2 t3 t4 |  self setFolder.  super
initialize.  self extent: 750 @ 490.  self color: Color paleBlue.  self
borderWidth: 2.  self position: 18 @ 0.  self toggleStickiness.  self
openInWorld.  miArchivo _ FileStream readOnlyFileNamed: 'PRUEBA'.  cartasOrden _
OrderedCollection new.  [cartasOrden size < 44] 	 whileTrue: [(cartasOrden
includes: (t4 _ 44 atRandom)) 			 ifFalse: [cartasOrden add: t4]].  losJugadores
_ Array new: 6.  1 	 to: 6 	 do: [:t5 | losJugadores at: t5 put: Jugador new
initialize].  (losJugadores at: 1) 	 esHumano: true.  jugadoresVivos _ 6.  1 	
to: 42 	 do: [:t6 | 
		 t2 _ String new. 		 t2 _ self leerArchivo. 		 t3 _
OrderedCollection new. 		 t1 _ Point readFromString: self leerArchivo. 		 t3
add: t1. 		 10 			 timesRepeat: [t1 _ Point readFromString: self leerArchivo.
t3 add: t1]. 		 self addMorphBack: (PaisMorph new nombre: t2 limites: t3; 					
numero: t6)].  self distribuyePaises.  self miColor.  ronda _ 1.  estado _ 1. 
numCarta _ 1.  playerTurn _ 1.  cambiosTotales _ 0.  self initialize2! ! 
!TEGMain methodsFor: 'initialization'! leerArchivo  | t1 t2 |  t2 _ String new. 
[miArchivo atEnd] 	 whileFalse: [t1 _ miArchivo next asCharacter. 		 t1
asciiValue = 13 			 ifTrue: [^ t2]. 		 t2 _ t2 , t1 asString]! !  !TEGMain
methodsFor: 'initialization'! miColor  | t1 t2 |  t1 _ Color 			 wheel: 6 			
saturation: 0.7 			 brightness: 0.9.  t2 _ 1.  t1 	 do: [:t3 | 
		 (losJugadores
at: t2) 			 miColor: t3. 		 t2 _ t2 + 1].  submorphs 	 do: [:t4 | t4 color:
(losJugadores at: t4 deQuienSoy) miColor]! !  !TEGMain methodsFor:
'initialization' stamp: 'edc 4/27/2004 14:43'! miColor: t1 
 1 	 to: 6 	 do:
[:t2 | (losJugadores at: t2) miColor 			 ifNil: [(losJugadores at: t2) 					
miColor: t1. 				 (losJugadores at: t2) misPaises 					 do: [:t3 | (submorphs
at: t3) 							 color: t1]. 				 t2 = 6 					 ifTrue: [cartel delete. 						
cartel _ TextMorph borderedPrototype.  cartel 	 beAllFont: (StrikeFont
familyName: #ComicBold size: 18).  cartel color: Color red.  cartel newContents:
'SqueakRos fight the evil '.  cartel extent: self width - 30 @ 40.  cartel
center: self center.  cartel top: self top + 10.  self addMorphBack: cartel.
self startStepping. 						 self makeMove]. 				 ^ t2]]! !  !TEGMain methodsFor:
'initialization'! repeat  | t1 t2 t3 |  t1 _ (losJugadores at: playerTurn)
misCartas size.  t2 _ 1.  [t2 > t1] 	 whileFalse: [((losJugadores at:
playerTurn) misCartas at: t2) 				 \\\ 3 = 0 			 ifFalse: [t3 _ (losJugadores
at: playerTurn) misCartas at: t2. 				 (losJugadores at: playerTurn) misCartas
at: t2 					 put: ((losJugadores at: playerTurn) misCartas at: t1). 				
(losJugadores at: playerTurn) misCartas at: t1 put: t3. 				 t1 _ t1 - 1]. 		 t2
_ t2 + 1]! !  !TEGMain methodsFor: 'initialization' stamp: 'edc 4/27/2004
14:46'! verificarCambio: t1 
 | t2 t3 t4 t5 t6 |  t3 _ 0.  t4 _ 0.  t5 _ 0.  t2
_ t1 submorphs 			 count: [:t7 | t7 class name = 'DrawCard' 					 and: [t7
submorphs first estado = true]].  t2 > 3 	 ifTrue: ["(StreamingMP3Sound
onFileNamed: NewFolder pathName , FileDirectory slash , 'tramposo.mp3') play."
cartel newContents: 'Tramposo '. 		 cartel center: t1 center. 		 t1 addMorph:
cartel].  t6 _ t1 submorphs 			 select: [:t7 | t7 class name = 'DrawCard' 					
and: [t7 submorphs first estado = true]] 			 thenCollect: [:t8 | t8 numero \\\
3].  t2 _ 0.  t6 	 do: [:t9 | t9 caseOf: { 			 [0] -> 
				 [t3 = 0 					
ifTrue: [t3 _ 1. 						 t2 _ t2 + 1]]. 			 [1] -> 
				 [t4 = 0 					 ifTrue:
[t4 _ 1. 						 t2 _ t2 + 1]]. 			 [2] -> 
				 [t5 = 0 					 ifTrue: [t5 _ 1.
t2 _ t2 + 1]]} 				 otherwise: [Transcript open]].  t6 _ t1 submorphs 			
select: [:t7 | t7 class name = 'DrawCard' 					 and: [t7 submorphs first estado
= true]] 			 thenCollect: [:t8 | t8 numero > 42 					 ifTrue: [t2 _ t2 + 1]]. 
t2 = 3 	 ifTrue: [^ true].  "(StreamingMP3Sound onFileNamed: NewFolder pathName
, FileDirectory slash , 'tramposo.mp3') play."  cartel newContents: 'Tramposo '.
cartel center: t1 center.  t1 addMorph: cartel! ! 
 !TEGMain methodsFor:
'menus'! addCustomMenuItems: t1 hand: t2 
 super addCustomMenuItems: t1 hand:
t2.  t1 addLine.  self addMenuItemsTo: t1 hand: t2! !  !TEGMain methodsFor:
'menus'! addMenuItemsTo: t1 hand: t2 
 t1 	 add: 'new game' 	 target: self 	
action: #newGame.  t1 	 add: 'reset...' 	 target: self 	 action: #reset.  t1 	
add: 'grabar estado' 	 target: self 	 action: #grabaEstado.  t1 	 add: 'leer
estado' 	 target: self 	 action: #leerEstado.  t1 	 add: 'debug' 	 target: self
action: #debug! !  !TEGMain methodsFor: 'menus'! cambiaCartas: t1 
 | t2 t3 t4 |
estado _ 4.  t3 _ #(4 6 8 10 12 15 ).  (losJugadores at: playerTurn) esHumano 	
ifTrue: [t4 _ self verificarCambio: t1] 	 ifFalse: [t4 _ true].  t1 submorphs 	
do: [:t5 | t5 class name = 'DrawCard' 			 ifTrue: [t5 submorphs first estado
ifTrue: [t2 _ (losJugadores at: playerTurn) misPaises includes: t5 numero.
t2 							 ifTrue: [(submorphs at: t5 numero) 									 add: 2]. 						
(losJugadores at: playerTurn) misCartas 							 remove: t5 numero 							
ifAbsent: []]]].  cambiosTotales _ cambiosTotales + 1.  cambiosTotales < 7 	
ifTrue: [pone _ pone + t3 at: cambiosTotales] 	 ifFalse: [pone _ pone + 15 + 5 *
(cambiosTotales - 6)].  t1 delete! !  !TEGMain methodsFor: 'menus'!
hacerListaPaises: t1 
 | t2 t3 |  t2 _ Set new.  (losJugadores at: playerTurn)
misPaises 	 do: [:t4 | limites 			 do: [:t5 | (t5 includes: t4) 					 ifTrue:
[t2 add: t5]]].  t3 _ t2 copy.  t1 	 ifTrue: [t2 			 do: [:t6 | (((losJugadores
at: playerTurn) misPaises 							 includes: (t6 at: 1)) 						 and:
[(losJugadores at: playerTurn) misPaises 								 includes: (t6 at: 2)]) 					
ifTrue: [t3 remove: t6]]] 	 ifFalse: [t2 			 do: [:t6 | (((losJugadores at:
playerTurn) misPaises 							 includes: (t6 at: 1)) 						 and: [(losJugadores
at: playerTurn) misPaises 								 includes: (t6 at: 2)]) 					 ifFalse: [t3
remove: t6]]].  ^ t3! !  !TEGMain methodsFor: 'menus'! reset  ^ self! ! 
!TEGMain methodsFor: 'sound effects'! soundEffects  | t1 t2 |  t1 _ 3 atRandom. 
t2 _ 'batalla' , t1 asString , '.wav'.  (SampledSound fromWaveFileNamed: t2)
play! ! 
 !TEGMain methodsFor: 'sending-receiving objects' stamp: 'edc 4/27/2004
17:43'! askMyData  | estadoTEG losPaises losPaisesData elPais soyDe nuevoColor |
estadoTEG _ activeSocket getObject.  self 	 losJugadores: (estadoTEG at: 1). 
self 	 cartasOrden: (estadoTEG at: 2).  self 	 ronda: (estadoTEG at: 3).  self 	
numCarta: (estadoTEG at: 4).  self 	 cambiosTotales: (estadoTEG at: 5). 
losPaises _ estadoTEG at: 6.  1 	 to: 42 	 do: [:pais | 
		 losPaisesData _
losPaises at: pais. 		 elPais _ self submorphs at: pais. 		 elPais 			
ejercitos: (losPaisesData at: 1). 		 elPais 			 deQuienSoy: (losPaisesData at:
2). 		 soyDe _ elPais deQuienSoy. 		 nuevoColor _ (self losJugadores at: soyDe)
miColor. 		 elPais redrawInColor: nuevoColor]. self playerTurn: ( estadoTEG at:
7)! !  !TEGMain methodsFor: 'sending-receiving objects' stamp: 'edc 4/28/2004
15:37'! sendMyData  | estadoTEG losPaises elPais losPaisesData |  serverOrClient
= #server 	 ifTrue: [ 		 activeSocket _ socketList at: playerTurn]. 
(activeSocket isValid 		 and: [activeSocket isConnected]) 	 ifTrue: [estadoTEG _
OrderedCollection new. 		 estadoTEG add: self losJugadores. 		 estadoTEG add:
self cartasOrden. 		 estadoTEG add: self ronda. 		 estadoTEG add: self numCarta.
estadoTEG add: self cambiosTotales. 		 losPaises _ Array new: 42. 		 1 			 to:
42 			 do: [:pais | 
				 elPais _ self submorphs at: pais. 				 losPaisesData _
Array new: 2. 				 losPaisesData at: 1 put: elPais ejercitos. 				 losPaisesData
at: 2 put: elPais deQuienSoy. 				 losPaises at: pais put: losPaisesData]. 		
estadoTEG add: losPaises. 		 estadoTEG add: self playerTurn. 		 activeSocket
sendObject: estadoTEG].  [activeSocket dataAvailable] whileFalse.  self
askMyData! !  "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!  TEGMain
class  instanceVariableNames: ''!  !TEGMain class methodsFor: 'as yet
unclassified'! debug  self maquinaPone! !  !TEGMain class methodsFor: 'as yet
unclassified'! new  | t1 t2 |  FileDirectory default pathParts last = 'STEG' 	
ifFalse: [self setFolder].  t1 _ FileStream readOnlyFileNamed: 'TEGBlank.morph'.
t2 _ t1 fileInObjectAndCode.  t2 openCenteredInWorld.  t2 initializeN! ! 
!TEGMain class methodsFor: 'as yet unclassified'! reset  | t1 t2 | 
FileDirectory default pathParts last = 'STEG' 	 ifFalse: [self setFolder].  t1 _
FileStream readOnlyFileNamed: 'TEGBlank.morph'.  t2 _ t1 fileInObjectAndCode. 
t2 leerEstado.  t2 openCenteredInWorld.  t2 initialize2! !  !TEGMain class
methodsFor: 'as yet unclassified'! resetFolder  FileDirectory
setDefaultDirectory: OldFolder! !  !TEGMain class methodsFor: 'as yet
unclassified'! setFolder  OldFolder _ FileDirectory default pathName. 
FileDirectory setDefaultDirectory: OldFolder , FileDirectory slash , 'STEG'. 
NewFolder _ FileDirectory default! !  !TEGMain class methodsFor: 'as yet
unclassified'! startAsCliente  | t1 t2 |  FileDirectory default pathParts last =
'STEG' 	 ifFalse: [self setFolder].  t1 _ FileStream readOnlyFileNamed:
'TEGBlank.morph'.  t2 _ t1 fileInObjectAndCode.  t2 openCenteredInWorld.  t2
serverOrClient: #cliente.  t2 initializeN! !  !TEGMain class methodsFor: 'as yet
unclassified'! startAsServer  | t1 t2 |  FileDirectory default pathParts last =
'STEG' 	 ifFalse: [self setFolder].  t1 _ FileStream readOnlyFileNamed:
'TEGBlank.morph'.  t2 _ t1 fileInObjectAndCode.  t2 openCenteredInWorld.  t2
serverOrClient: #server.  t2 initializeN! ! 
 Object subclass: #TEGServer 
instanceVariableNames: 'port socketList activeClient addClient ' 
classVariableNames: ''  poolDictionaries: ''  category: 'Morphic-TEG'! 
!TEGServer methodsFor: 'as yet unclassified' stamp: 'edc 4/27/2004 14:58'!
addClient ^ addClient! !  !TEGServer methodsFor: 'as yet unclassified' stamp:
'edc 4/29/2004 11:44'! addClient: t1 
 | t2 instanciaTEG |  t2 _ NetNameResolver
stringFromAddress: t1 remoteAddress.  Transcript show: t2; 		 tab.  Transcript
show: t1 getData; 		 cr.  activeClient _ activeClient + 1.  socketList 	 at: t2
ifAbsent: [socketList at: activeClient put: t1].  activeClient = 3 	 ifTrue:
[instanciaTEG _ ActiveWorld submorphs 					 detect: [:t | t class == TEGMain].
instanciaTEG socketList: self socketList]! !  !TEGServer methodsFor: 'as yet
unclassified'! port: t1 
 port _ t1! !  !TEGServer methodsFor: 'as yet
unclassified' stamp: 'edc 4/27/2004 11:56'! ringLoop  | t1 t2 t3 instanciaTEG
elPais estadoTEG losPaises losPaisesData |  instanciaTEG _ ActiveWorld submorphs
detect: [:t | t class == TEGMain].  [true] 	 whileTrue: [activeClient _
activeClient \\ 2 + 1. 		 t1 _ socketList at: activeClient. 		 (t1 isValid 				
and: [t1 isConnected]) 			 ifTrue: [instanciaTEG activeSocket: t1.  estadoTEG _
OrderedCollection new. 				 estadoTEG add: instanciaTEG losJugadores. 				
estadoTEG add: instanciaTEG cartasOrden. 				 estadoTEG add: instanciaTEG ronda.
estadoTEG add: instanciaTEG numCarta. 				 estadoTEG add: instanciaTEG
cambiosTotales. 				 losPaises _ Array new: 42. 				 1 					 to: 42 					 do:
[:pais | 
						 elPais _ instanciaTEG submorphs at: pais. 						 losPaisesData
_ Array new: 2. 						 losPaisesData at: 1 put: elPais ejercitos. 						
losPaisesData at: 2 put: elPais deQuienSoy. 						 losPaises at: pais put:
losPaisesData]. 				 estadoTEG add: losPaises. 				 t1 sendObject: estadoTEG.
[t1 dataAvailable] whileFalse. 				 instanciaTEG askMyData. 				 self halt. 				
t3 _ NetNameResolver stringFromAddress: t1 remoteAddress. 				 Transcript show:
t3; 						 tab. 				 Transcript show: t2 printString; 						 cr. 				 self
halt]]! !  !TEGServer methodsFor: 'as yet unclassified' stamp: 'edc 4/27/2004
15:10'! socketList ^ socketList! !  !TEGServer methodsFor: 'as yet unclassified'
stamp: 'edc 4/26/2004 15:34'! start  | listener |  socketList _ Dictionary new. 
activeClient _ 0.  addClient _ true.  listener _ TcpListener 			 on: 8000 			
handler: [:socket | addClient 					 ifTrue: [self addClient: socket]].  listener
forkAndListenWhile: [addClient].  ! !  !TEGServer methodsFor: 'as yet
unclassified' stamp: 'edc 4/27/2004 09:02'! stop  Socket  allInstancesDo: [ :i |
i closeAndDestroy].  socketList  _ nil.  self becomeForward: nil! !  "-- -- --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!  TEGServer class 
instanceVariableNames: ''!  !TEGServer class methodsFor: 'defaults'! defaultPort
^ 8000! !  !TEGServer class methodsFor: 'defaults'! priority  ^ Processor
lowIOPriority! !  !TEGServer class methodsFor: 'defaults'! start  Transcript
open.  Transcript show: 'TEGServer starting...'; 		 cr.  ^ self startOn: self
defaultPort! ! 
 !TEGServer class methodsFor: 'running'! startOn: t1 
 ^ self
new port: t1; 		 start! !  !TEGServer class methodsFor: 'running'! stop  self 	
allInstancesDo: [:t1 | t1 stop]! ! 
 ImageMorph subclass: #TEGStartButton 
instanceVariableNames: ''  classVariableNames: ''  poolDictionaries: '' 
category: 'Morphic-TEG'!  !TEGStartButton methodsFor: 'menu'! addMenuItemsTo: t1
hand: t2 
 | t3 |  t3 _ MenuMorph new.  t3 color: Color blue.  t3 	 color: (t3
color alpha: 0.5).  t3 	 add: 'Soy server' 	 target: TEGMain 	 action:
#startAsServer.  t3 	 add: 'Soy cliente ' 	 target: TEGMain 	 action:
#startAsCliente.  t3 items 	 do: [:t4 | t4 color: Color yellow; 				
			 font:
(StrikeFont 					 familyName: 'Comic Bold' 					 size: 18 					 emphasized: 1)].
t3 invokeModal! ! 
 !TEGStartButton methodsFor: 'event handling'!
handlesMouseDown: t1 
 ^ true! !  !TEGStartButton methodsFor: 'event handling'!
mouseDown: t1 
 | t2 |  t1 yellowButtonPressed 	 ifFalse: [^ t1 hand
waitForClicksOrDrag: self event: t1].  t2 _ MenuMorph new defaultTarget: self. 
self addMenuItemsTo: t2 hand: t1 hand.  t2 popUpEvent: t1 in: self world! !

#485 De: "Lic. Edgar J. De Cleene" <edgardec2001@...>
Fecha: Mar, 27 de Abr, 2004 9:02 pm
Asunto: [TEG] Tercer experimento de protocolo de red
edgardec2001
Sin conexión Sin conexión
Enviar correo Enviar correo
 
A todos los interesados, les cuento.
El TEG está dando sus primeros pasos, se comuninican las compu y los objetos
viajan correctamente.
Hay que "deschanchar" el código , que esta lleno de halts y salidas en
Transcript y depurar bastante.
Veremos si mañana termino y pudo ir a la facu para pruebas finales en mas de
dos máquinas (y ver si en Windows aparecen cosas raras).
Adjunto el código hasta ahora , para los curiosos.
Edgar
Morph subclass: #DrawCard  instanceVariableNames: 'nombre deQuienSoy numero ' 
classVariableNames: ''  poolDictionaries: ''  category: 'Morphic-TEG'! 
!DrawCard methodsFor: 'initialization'! dibujaUnaCarta: t1 
 | t2 t3 t4 t5 | 
self numero: t1.  t4 _ #('Soldado1.jpg' 'Canon.jpg' 'Caballo.jpg' ).  t1 > 42 	
ifTrue: [t3 _ self top + 5. 		 t4 			 do: [:t6 | 
				 self 					 addMorph:
(DrawPicture new initializeWith: t6 escala: 0.7). 				 self submorphs first
center: self center. 				 self submorphs first top: t3. 				 t3 _ t3 + 40]] 	
ifFalse: [t5 _ t1 \\\ 3 + 1. 		 self 			 addMorphBack: (DrawPicture new 					
initializeWith: (t4 at: t5) 					 valor: t1 					 pos: self left + 20 @ self
center y). 		 t2 _ StringMorph contents: self nombre. 		 t2 center: self center.
t2 top: self top + 8. 		 self addMorphBack: t2]! !  !DrawCard methodsFor:
'initialization'! initialize  super initialize.  self setProperty: #dragEnabled
toValue: true.  self extent: 80 @ 120.  self color: Color lightGray.  self
borderColor: Color black.  self borderWidth: 2! !  !DrawCard methodsFor:
'initialization'! initializeOff  self addMorph: (Form fromFileNamed:
'TEGCarta.jpg') asMorph! !  !DrawCard methodsFor: 'initialization'! nombre: t1
limites: t2 
 | t3 t4 t5 |  nombre _ t1.  ejEnPais _ 0.  self 	 vertices: t2
asArray 	 color: Color white 	 borderWidth: 2 	 borderColor: Color black.  t4 _
self center.  t5 _ Morph new.  t5 	 bounds: (Rectangle 			 left: t4 x 			 right:
t4 x + 15 			 top: t4 y 			 bottom: t4 y + 10).  t5 color: Color white.  self
addMorph: t5.  t3 _ TextMorph new.  t3 autoFit: true.  t3 	 string: ejEnPais
asString 	 fontName: #ComicBold 	 size: 18 	 wrap: false.  t3 contents: ejEnPais
asString.  t3 bounds: t5.  t3 centered.  self addMorph: t3.  t3 lock! ! 
!DrawCard methodsFor: 'access'! deQuienSoy  ^ deQuienSoy! !  !DrawCard
methodsFor: 'access'! deQuienSoy: t1 
 deQuienSoy _ t1! !  !DrawCard methodsFor:
'access'! nombre  ^ nombre! !  !DrawCard methodsFor: 'access'! nombre: t1 
nombre _ t1! !  !DrawCard methodsFor: 'access'! numero  ^ numero! !  !DrawCard
methodsFor: 'access'! numero: t1 
 numero _ t1! ! 
 !DrawCard methodsFor: 'event
handling'! click: t1 
 ^ self! !  !DrawCard methodsFor: 'event handling'!
doubleClick: t1 
 submorphs first 	 ifNil: [^ 0].  submorphs first delete.  self
dibujaUnaCarta: numero! !  !DrawCard methodsFor: 'event handling'!
handlesMouseDown: t1 
 ^ true! !  !DrawCard methodsFor: 'event handling'!
mouseDown: t1 
 t1 hand waitForClicksOrDrag: self event: t1.  t1 hand grabMorph:
self! !  "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!  DrawCard
class  instanceVariableNames: ''!  !DrawCard class methodsFor: 'as yet
unclassified'! initializeOff  | t1 |  t1 _ self new.  FileDirectory default
pathParts last = 'STEG' 	 ifFalse: [TEGMain setFolder].  t1 addMorph: (Form
fromFileNamed: 'TEGCarta.jpg') asMorph.  ^ t1! ! 
 IconicButton subclass:
#DrawPicture  instanceVariableNames: 'estado valor '  classVariableNames: '' 
poolDictionaries: ''  category: 'Morphic-TEG'!  !DrawPicture methodsFor: 'as yet
unclassified'! estado  ^ estado! !  !DrawPicture methodsFor: 'as yet
unclassified'! estado: t1 
 | t2 |  estado _ t1.  estado 	 ifTrue: [t2 _
submorphs first form. 		 t2 mapColor: Color white to: Color lightRed] 	 ifFalse:
[t2 _ submorphs first form. 		 t2 mapColor: Color lightRed to: Color white]! ! 
!DrawPicture methodsFor: 'as yet unclassified'! initializeWith: t1 escala: t2 
| t3 |  t3 _ Form fromFileNamed: t1.  t3 _ t3 magnify: t3 boundingBox by: t2. 
self labelGraphic: t3! !  !DrawPicture methodsFor: 'as yet unclassified'!
initializeWith: t1 valor: t2 pos: t3 
 | t4 |  valor _ t2.  self estado: false. 
t4 _ Form fromFileNamed: t1.  self labelGraphic: t4.  self position: t3! ! 
!DrawPicture methodsFor: 'as yet unclassified'! initializeWith: t1 valor: t2
rect: t3 
 | t4 |  valor _ t2.  self estado: false.  t4 _ Form fromFileNamed:
t1.  self labelGraphic: t4.  self bounds: t3.  self comeToFront! !  !DrawPicture
methodsFor: 'as yet unclassified'! mouseUp: t1 
 (self containsPoint: t1
cursorPoint) 	 ifTrue: [self setSwitchState: estado = false. 		 self
doButtonAction] 	 ifFalse: [self setSwitchState: estado = true]! !  !DrawPicture
methodsFor: 'as yet unclassified'! setSwitchState: t1 
 t1 	 ifTrue: [self
borderColor: #inset. 		 self estado: true] 	 ifFalse: [self borderColor:
#raised. 		 self estado: false]! !  !DrawPicture methodsFor: 'as yet
unclassified'! valor  ^ valor! ! 
 Morph subclass: #InformaCartas 
instanceVariableNames: ''  classVariableNames: ''  poolDictionaries: '' 
category: 'Morphic-TEG'!  !InformaCartas methodsFor: 'initialization'!
initialize: t1 
 | t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 |  super initialize.  self 	
bounds: (Rectangle 			 left: 710 			 right: 748 			 top: 220 			 bottom: 460). 
self color: Color white.  self borderColor: Color black.  self borderWidth: 2. 
t2 _ t1 size.  t3 _ (216 / t2) asInteger.  t4 _ 224.  t5 _ 224 + t3.  t6 _ 237. 
t7 _ 247.  t3 _ t3 + 3.  1 	 to: t2 	 do: [:t12 | 
		 t8 _ Morph new. 		 t8 			
bounds: (Rectangle 					 left: 712 					 right: 748 					 top: t4 					 bottom:
t5). 		 t8 color: (t1 at: t12) miColor. 		 t8 borderColor: Color black. 		 t8
borderWidth: 2. 		 self addMorph: t8. 		 (t1 at: t12) vive 			 ifTrue: [t9 _
Morph new. 				 t9 					 bounds: (Rectangle 							 left: 720 							 right: 738
top: t6 							 bottom: t7). 				 t9 color: Color white. 				 t9 borderColor:
Color black. 				 t9 borderWidth: 2. 				 self addMorph: t9. 				 t10 _
StringMorph contents: (t1 at: t12) misCartas size asString. 				 t10 center: t9
center. 				 self addMorph: t10] 			 ifFalse: [t11 _ DrawPicture new 							
initializeWith: 'muerte.gif' 							 valor: 0 							 pos: t8 topLeft. 				 self
addMorph: t11]. 		 t4 _ t4 + t3. 		 t5 _ t5 + t3. 		 t6 _ t6 + t3. 		 t7 _ t7 +
t3].  self openInWorld! ! 
 Object subclass: #Jugador  instanceVariableNames:
'vive esHumano misPaises misCartas miColor '  classVariableNames: '' 
poolDictionaries: ''  category: 'Morphic-TEG'!  !Jugador methodsFor: 'accesing'!
esHumano  ^ esHumano! !  !Jugador methodsFor: 'accesing'! esHumano: t1 
esHumano _ t1! !  !Jugador methodsFor: 'accesing'! initialize  vive _ true. 
esHumano _ false.  misPaises _ OrderedCollection new.  misCartas _
OrderedCollection new! !  !Jugador methodsFor: 'accesing'! miColor  ^ miColor! !
!Jugador methodsFor: 'accesing'! miColor: t1 
 miColor _ t1! !  !Jugador
methodsFor: 'accesing'! misCartas  ^ misCartas! !  !Jugador methodsFor:
'accesing'! misCartas: t1 
 misCartas add: t1! !  !Jugador methodsFor:
'accesing'! misPaises  ^ misPaises! !  !Jugador methodsFor: 'accesing'!
misPaises: t1 
 misPaises add: t1! !  !Jugador methodsFor: 'accesing'! vive  ^
vive! !  !Jugador methodsFor: 'accesing'! vive: t1 
 vive _ t1! ! 

PolygonMorph subclass: #PaisMorph  instanceVariableNames: 'nombre ejEnPais
deQuienSoy instanciaTEG numero misLimites '  classVariableNames: '' 
poolDictionaries: ''  category: 'Morphic-TEG'!  !PaisMorph methodsFor:
'initialization'! initialize  instanciaTEG _ ActiveWorld submorphs 			 detect:
[:t1 | t1 class == TEGMain].  super initialize.  misLimites _ SortedCollection
new! !  !PaisMorph methodsFor: 'initialization'! nombre: t1 limites: t2 
 | t3
t4 t5 |  nombre _ t1.  ejEnPais _ 0.  self 	 vertices: t2 asArray 	 color: Color
white 	 borderWidth: 2 	 borderColor: Color black.  t4 _ self center.  t5 _
Morph new.  t5 	 bounds: (Rectangle 			 left: t4 x 			 right: t4 x + 15 			 top:
t4 y 			 bottom: t4 y + 10).  t5 color: Color white.  self addMorph: t5.  t3 _
TextMorph new.  t3 autoFit: true.  t3 	 string: ejEnPais asString 	 fontName:
#ComicBold 	 size: 18 	 wrap: false.  t3 contents: ejEnPais asString.  t3
bounds: t5.  t3 centered.  self addMorph: t3.  t3 lock! ! 
 !PaisMorph
methodsFor: 'event handling'! click: t1 
 | t2 t3 |  t2 _ 'Soy ' , nombre
asString , ' numero ' , numero asString , 'y pertenezco a ' , deQuienSoy
asString.  self showBalloon: t2 hand: t1 hand.  t3 _ 0.  (instanciaTEG
permitido: numero) 	 ifFalse: [^ false].  instanciaTEG submorphs 	 do: [:t4 | t4
class == DrawPicture 			 ifTrue: [t3 _ t3 + 1. 				 instanciaTEG pone:
instanciaTEG pone - 1. 				 t4 estado 					 ifTrue: [ejEnPais _ ejEnPais + t4
valor. 						 t3 _ t3 - 1. 						 t4 delete]]].  self mostrar.  t3 = 1 	 ifTrue:
[instanciaTEG ronda < 5 			 ifTrue: [instanciaTEG continue] 			 ifFalse:
[instanciaTEG estado: 2]]! !  !PaisMorph methodsFor: 'event handling'!
firstClickTimedOut: t1 
 | t2 t3 |  t2 _ owner rootForGrabOf: self.  t2 	 ifNil:
[t3 _ self copy. 		 self board owner owner addMorphFront: t3. 		 self world
displayWorld. 		 (Delay forMilliseconds: 750) wait. 		 t3 delete] 	 ifNotNil:
[t1 hand grabMorph: t2]! !  !PaisMorph methodsFor: 'event handling'!
handlesMouseDown: t1 
 ^ true! !  !PaisMorph methodsFor: 'event handling'!
mouseDown: t1 
 t1 hand waitForClicksOrDrag: self event: t1! !  !PaisMorph
methodsFor: 'event handling'! mouseEnter: t1 
 | t2 |  t2 _ 'Soy ' , nombre
asString , ' y pertenezco a ' , deQuienSoy asString.  self showBalloon: t2 hand:
t1 hand! ! 
 !PaisMorph methodsFor: 'access'! add: t1 
 ejEnPais _ ejEnPais +
t1.  self mostrar! !  !PaisMorph methodsFor: 'access'! deQuienSoy  ^ deQuienSoy!
!  !PaisMorph methodsFor: 'access'! deQuienSoy: t1 
 deQuienSoy _ t1! ! 
!PaisMorph methodsFor: 'access'! doubleClick: t1 
 1 	 to: 42 	 do: [:t2 |
(instanciaTEG submorphs at: t2) 			 color: Color white].  (instanciaTEG
submorphs at: numero) 	 color: Color green.  misLimites 	 do: [:t3 |
(instanciaTEG submorphs at: t3) 			 color: Color red].  self borderWidth: 4; 		
borderColor: Color red.  ^ self numero! !  !PaisMorph methodsFor: 'access'!
ejercitos  ^ ejEnPais! !  !PaisMorph methodsFor: 'access'! ejercitos: t1 
ejEnPais _ t1.  self mostrar! !  !PaisMorph methodsFor: 'access'! misLimites  ^
misLimites! !  !PaisMorph methodsFor: 'access'! misLimites: t1 
 misLimites _
t1! !  !PaisMorph methodsFor: 'access'! mostrar  submorphs first contents:
ejEnPais asString.  submorphs 	 do: [:t1 | t1 center: self center]! ! 
!PaisMorph methodsFor: 'access'! noMostrar  submorphs 	 do: [:t1 | t1 delete]! !
!PaisMorph methodsFor: 'access'! nombre  ^ nombre! !  !PaisMorph methodsFor:
'access'! numero  ^ numero! !  !PaisMorph methodsFor: 'access'! numero: t1 
numero _ t1! !  !PaisMorph methodsFor: 'access'! otroLimites: t1 
 misLimites _
misLimites add: t1! !  !PaisMorph methodsFor: 'access'! redrawInColor: t1 
 self
color: t1.  submorphs first contents: ejEnPais asString.  submorphs 	 do: [:t2 |
t2 center: self center]! ! 
 Object subclass: #TEGClient 
instanceVariableNames: 'socket serverName instanciaTEG '  classVariableNames: ''
poolDictionaries: ''  category: 'Morphic-TEG'!  !TEGClient methodsFor: 'as yet
unclassified' stamp: 'edc 4/27/2004 16:21'! initialize  | t1 |  Transcript open.
Transcript show: 'starting remote client'; 		 cr.  Transcript show:
'initializing network ... '.  Socket initializeNetwork.  Transcript show: 'ok';
cr.  serverName _ FillInTheBlank request: 'Type server name or IPAddress'
initialAnswer: 'Enterprise'.  t1 _ FillInTheBlank request: 'Type client name'
initialAnswer: ''.  Transcript show: 'server start to perform instructions'; 		
cr.  self newSocket. socket sendData: t1.  instanciaTEG _ ActiveWorld submorphs
detect: [:t2 | t2 class == TEGMain].  instanciaTEG activeSocket: self socket. 
instanciaTEG done: true! !  !TEGClient methodsFor: 'as yet unclassified'!
newCommand  ^ FillInTheBlank request: 'Type remote image command' initialAnswer:
''! !  !TEGClient methodsFor: 'as yet unclassified'! newSocket  socket _ Socket
newTCP.  socket 	 connectTo: (NetNameResolver addressForName: serverName) 	
port: 8000.  socket waitForConnectionUntil: Socket standardDeadline! ! 
!TEGClient methodsFor: 'as yet unclassified' stamp: 'edc 4/27/2004 10:51'!
nextCommand: t1 
 | t2 t3 elPais soyDe nuevoColor estadoTEG losPaises
losPaisesData |  t3 _ t1.  [t3 = 'FIN'] 	 whileFalse: [(socket isValid 				 and:
[socket isConnected]) 			 ifTrue: [Transcript show: 'Command sended is ' , t3;
cr. 				 socket sendData: t3] 			 ifFalse: [socket destroy. 				 socket _ nil].
[socket dataAvailable] whileFalse. 		
		 estadoTEG _ socket getObject. 		
instanciaTEG 			 losJugadores: (estadoTEG at: 1). 		 instanciaTEG 			
cartasOrden: (estadoTEG at: 2). 		 instanciaTEG 			 ronda: (estadoTEG at: 3). 		
instanciaTEG 			 numCarta: (estadoTEG at: 4). 		 instanciaTEG 			
cambiosTotales: (estadoTEG at: 5). 		 losPaises _ estadoTEG at: 6. 		 1 			 to:
42 			 do: [:pais | 
				 losPaisesData _ losPaises at: pais. 				 elPais _
instanciaTEG submorphs at: pais. 				 Transcript show: elPais nombre; 						
tab. 				 elPais 					 ejercitos: (losPaisesData at: 1). 				 Transcript show:
elPais ejercitos; 						 tab. 				 elPais 					 deQuienSoy: (losPaisesData at:
2). 				 Transcript show: elPais deQuienSoy; 						 cr. 				 soyDe _ elPais
deQuienSoy. 				 nuevoColor _ (instanciaTEG losJugadores at: soyDe) miColor.
elPais redrawInColor: nuevoColor]. 		 ^ 0].  self halt.  t2 = 'WAIT' 	 ifTrue:
[[socket dataAvailable] whileFalse. 		 t2 _ socket getData. 		 self halt].  t3 _
self newCommand! !  !TEGClient methodsFor: 'as yet unclassified' stamp: 'edc
4/27/2004 10:31'! socket ^ socket! !  "-- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- -- "!  TEGClient class  instanceVariableNames: ''!  !TEGClient class
methodsFor: 'as yet unclassified'! new  super new initialize! !  !TEGClient
class methodsFor: 'as yet unclassified'! start  super new initialize! ! 

BorderedMorph subclass: #TEGMain  instanceVariableNames: 'miArchivo cartasOrden
losJugadores jugadoresVivos cartel pone cambiosTotales playerTurn ronda limites
done lim estado numCarta mazo activeSocket serverOrClient socketList ' 
classVariableNames: 'NewFolder '  poolDictionaries: ''  category: 'Morphic-TEG'!
!TEGMain methodsFor: 'accessing' stamp: 'edc 4/26/2004 17:28'! activeSocket 
"Answer the value of activeSocket" 
 ^ activeSocket! !  !TEGMain methodsFor:
'accessing' stamp: 'edc 4/26/2004 17:28'! activeSocket: anObject  "Set the value
of activeSocket" 
 activeSocket _ anObject! !  !TEGMain methodsFor: 'accessing'
stamp: 'edc 4/26/2004 17:28'! cambiosTotales  "Answer the value of
cambiosTotales" 
 ^ cambiosTotales! !  !TEGMain methodsFor: 'accessing'!
cambiosTotales: t1 
 cambiosTotales _ t1! !  !TEGMain methodsFor: 'accessing'
stamp: 'edc 4/26/2004 17:28'! cartasOrden  "Answer the value of cartasOrden" 
 ^
cartasOrden! !  !TEGMain methodsFor: 'accessing'! cartasOrden: t1 
 cartasOrden
_ t1! !  !TEGMain methodsFor: 'accessing' stamp: 'edc 4/26/2004 17:28'! cartel 
"Answer the value of cartel" 
 ^ cartel! !  !TEGMain methodsFor: 'accessing'
stamp: 'edc 4/26/2004 17:28'! cartel: anObject  "Set the value of cartel" 
cartel _ anObject! !  !TEGMain methodsFor: 'accessing' stamp: 'edc 4/26/2004
17:28'! done  "Answer the value of done" 
 ^ done! !  !TEGMain methodsFor:
'accessing' stamp: 'edc 4/26/2004 17:28'! done: anObject  "Set the value of
done" 
 done _ anObject! !  !TEGMain methodsFor: 'accessing' stamp: 'edc
4/26/2004 17:28'! estado  "Answer the value of estado" 
 ^ estado! !  !TEGMain
methodsFor: 'accessing'! estado: t1 
 estado _ t1! !  !TEGMain methodsFor:
'accessing'! jugadoresVivos  ^ jugadoresVivos! !  !TEGMain methodsFor:
'accessing'! jugadoresVivos: t1 
 jugadoresVivos _ t1! !  !TEGMain methodsFor:
'accessing' stamp: 'edc 4/26/2004 17:28'! lim  "Answer the value of lim" 
 ^
lim! !  !TEGMain methodsFor: 'accessing' stamp: 'edc 4/26/2004 17:28'! lim:
anObject  "Set the value of lim" 
 lim _ anObject! !  !TEGMain methodsFor:
'accessing' stamp: 'edc 4/26/2004 17:28'! limites  "Answer the value of limites"
^ limites! !  !TEGMain methodsFor: 'accessing' stamp: 'edc 4/26/2004 17:28'!
limites: anObject  "Set the value of limites" 
 limites _ anObject! !  !TEGMain
methodsFor: 'accessing'! losJugadores  ^ losJugadores! !  !TEGMain methodsFor:
'accessing'! losJugadores: t1 
 losJugadores _ t1! !  !TEGMain methodsFor:
'accessing' stamp: 'edc 4/26/2004 17:28'! mazo  "Answer the value of mazo" 
 ^
mazo! !  !TEGMain methodsFor: 'accessing' stamp: 'edc 4/26/2004 17:28'! mazo:
anObject  "Set the value of mazo" 
 mazo _ anObject! !  !TEGMain methodsFor:
'accessing' stamp: 'edc 4/26/2004 17:28'! miArchivo  "Answer the value of
miArchivo" 
 ^ miArchivo! !  !TEGMain methodsFor: 'accessing' stamp: 'edc
4/26/2004 17:28'! miArchivo: anObject  "Set the value of miArchivo" 
 miArchivo
_ anObject! !  !TEGMain methodsFor: 'accessing' stamp: 'edc 4/26/2004 17:28'!
numCarta  "Answer the value of numCarta" 
 ^ numCarta! !  !TEGMain methodsFor:
'accessing'! numCarta: t1 
 numCarta _ t1! !  !TEGMain methodsFor: 'accessing'!
paises: t1 
 | t2 t3 |  1 	 to: 42 	 do: [:t4 | 
		 (submorphs at: t4) 			
ejercitos: ((t1 at: t4) 					 at: 1). 		 (submorphs at: t4) 			 deQuienSoy: ((t1
at: t4) 					 at: 2). 		 t2 _ (submorphs at: t4) deQuienSoy. 		 t3 _
(losJugadores at: t2) miColor. 		 (submorphs at: t4) 			 redrawInColor: t3]! ! 
!TEGMain methodsFor: 'accessing' stamp: 'edc 4/26/2004 17:28'! playerTurn 
"Answer the value of playerTurn" 
 ^ playerTurn! !  !TEGMain methodsFor:
'accessing'! playerTurn: t1 
 playerTurn _ t1! !  !TEGMain methodsFor:
'accessing'! pone  ^ pone! !  !TEGMain methodsFor: 'accessing'! pone: t1 
 pone
_ t1! !  !TEGMain methodsFor: 'accessing'! ronda  ^ ronda! !  !TEGMain
methodsFor: 'accessing'! ronda: t1 
 ronda _ t1! !  !TEGMain methodsFor:
'accessing' stamp: 'edc 4/26/2004 15:03'! serverOrClient  ^serverOrClient! ! 
!TEGMain methodsFor: 'accessing' stamp: 'edc 4/26/2004 14:57'! serverOrClient:
aChoice serverOrClient _ aChoice! !  !TEGMain methodsFor: 'accessing' stamp:
'edc 4/27/2004 15:13'! socketList: aDictionary socketList _ aDictionary. done _
true.! ! 
 !TEGMain methodsFor: 'as yet unclassified'! hacerListaPaises  | t1 t2
|  t1 _ Set new.  (losJugadores at: playerTurn) misPaises 	 do: [:t3 | limites
do: [:t4 | (t4 includes: t3) 					 ifTrue: [t1 add: t4]]].  t2 _ t1 copy.  t1 	
do: [:t5 | (((losJugadores at: playerTurn) misPaises 					 includes: (t5 at: 1))
and: [(losJugadores at: playerTurn) misPaises 						 includes: (t5 at: 2)]) 			
ifTrue: [t2 remove: t5]].  ^ t2! !  !TEGMain methodsFor: 'as yet unclassified'!
in: t1 pos1: t2 pos2: t3 
 | t4 t5 |  t4 _ (losJugadores at: playerTurn)
misPaises includes: t1.  t4 	 ifTrue: [t5 _ (losJugadores at: playerTurn)
misCartas at: t2. 		 (losJugadores at: playerTurn) misCartas 			 at: t2 			 put:
((losJugadores at: playerTurn) misCartas at: t3). 		 (losJugadores at:
playerTurn) misCartas at: t3 put: t5]! !  !TEGMain methodsFor: 'as yet
unclassified'! optimizarCambio  | t1 t2 t3 t4 t5 |  t5 _ Array new: 6. 
(losJugadores at: playerTurn) misCartas 	 do: [:t6 | t2 _ t6 \\\ 3 , self halt].
(losJugadores at: playerTurn) misCartas 	 do: [:t6 | ((losJugadores at:
playerTurn) misPaises includes: t6) 			 ifTrue: [t1 _ (losJugadores at:
playerTurn) misCartas indexOf: t6. 				 t2 _ t6 \\\ 3]].  t3 _ 0.  (losJugadores
at: playerTurn) misCartas 	 do: [:t7 | 
		 t3 _ t3 + 1. 		 t7 \\\ 3 = t2 			
ifTrue: [t4 _ (losJugadores at: playerTurn) misCartas at: t1. 				 (losJugadores
at: playerTurn) misCartas 					 at: t1 					 put: ((losJugadores at: playerTurn)
misCartas at: t3). 				 (losJugadores at: playerTurn) misCartas at: t3 put: t4.
^ true]. 		 nil]! ! 
 !TEGMain methodsFor: 'debug and other'! debug  submorphs 	
do: [:t1 | t1 class == DrawPicture 			 ifTrue: [t1 delete]].  17 	 to: 99 	 do:
[:t2 | 
		 pone _ t2. 		 self eligeEjercitos: t2 jugador: 1]! !  !TEGMain
methodsFor: 'debug and other'! maximo: t1 
 | t2 t3 t4 |  t1 	 do: [:t5 | t2 			
ifNil: [t3 _ t5 x. 				 t2 _ t5 x] 			 ifNotNil: [(t4 _ t5 x) > t2 					 ifTrue:
[t3 _ t5 x. 						 t2 _ t4]]].  ^ t2! !  !TEGMain methodsFor: 'debug and other'!
minimo: t1 
 | t2 t3 t4 |  t1 	 do: [:t5 | t2 			 ifNil: [t3 _ t5 x. 				 t2 _
t5 x] 			 ifNotNil: [(t4 _ t5 x) < t2 					 ifTrue: [t3 _ t5 x. 						 t2 _
t4]]].  ^ t2! !  !TEGMain methodsFor: 'debug and other'! split  self
eligeEjercitos: pone jugador: playerTurn! ! 
 !TEGMain methodsFor: 'event
handling'! handlesMouseDown: t1 
 ^ Smalltalk isMorphic not 	 or: [t1
yellowButtonPressed]! !  !TEGMain methodsFor: 'event handling'! mouseDown: t1 
| t2 |  t1 yellowButtonPressed 	 ifFalse: [^ self].  t2 _ MenuMorph new
defaultTarget: self.  self addMenuItemsTo: t2 hand: t1 hand.  t2 popUpEvent: t1
in: self world! ! 
 !TEGMain methodsFor: 'fileIn/out'! grabaEstado  | t1 |  t1 _
ReferenceStream fileNamed: 'estado.teg'.  t1 nextPut: losJugadores.  t1 nextPut:
cartasOrden.  t1 nextPut: jugadoresVivos.  t1 nextPut: playerTurn.  t1 nextPut:
ronda.  t1 nextPut: numCarta.  t1 nextPut: cambiosTotales.  1 	 to: 42 	 do:
[:t2 | 
		 t1 nextPut: (submorphs at: t2) ejercitos. 		 t1 nextPut: (submorphs
at: t2) deQuienSoy].  t1 close! !  !TEGMain methodsFor: 'fileIn/out'! leerEstado
| t1 |  t1 _ ReferenceStream fileNamed: 'estado.teg'.  losJugadores _ t1 next. 
cartasOrden _ t1 next.  jugadoresVivos _ t1 next.  playerTurn _ t1 next.  ronda
_ t1 next.  numCarta _ t1 next.  cambiosTotales _ t1 next.  1 	 to: 42 	 do:
[:t2 | 
		 (submorphs at: t2) 			 ejercitos: t1 next. 		 (submorphs at: t2) 			
deQuienSoy: t1 next].  t1 close.  self miColor! ! 
 !TEGMain methodsFor: 'game
sequence'! armaBatallones  | t1 t2 t3 t4 t5 t6 t7 |  t7 _ Array new: 5.  t1 _
pone.  t2 _ 0.  t3 _ 0.  t4 _ 0.  t5 _ 0.  t6 _ 0.  t2 _ (t1 / 50) asInteger. 
t1 _ t1 \\\ 50.  t3 _ (t1 / 20) asInteger.  t1 _ t1 \\\ 20.  t4 _ (t1 / 10)
asInteger.  t1 _ t1 \\\ 10.  t1 = 5 	 ifTrue: [t6 _ 5] 	 ifFalse: [t5 _ (t1 / 5)
asInteger. 		 t6 _ t1 \\\ 5].  pone <= 9 	 ifFalse: [[t2 + t3 + t4 + t5 + t6 <=
5] 			 whileTrue: [t4 > 0 					 ifTrue: [t4 _ t4 - 1. 						 t5 _ t5 + 2] 					
ifFalse: [t3 > 0 							 ifTrue: [t3 _ t3 - 1. 								 t4 _ t4 + 2] 							
ifFalse: [t2 > 0 									 ifTrue: [t2 _ t2 - 1. 										 t3 _ t3 + 2.
t4 _ t4 + 5] 									 ifFalse: [t5 > 0 											 ifTrue: [t5 _ t5 - 1.
t6 _ t6 + 5]]]]]].  t7 at: 1 put: t6.  t7 at: 2 put: t5.  t7 at: 3 put: t4.  t7
at: 4 put: t3.  t7 at: 5 put: t2.  ^ t7! !  !TEGMain methodsFor: 'game
sequence'! atacaMaquina  | t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 |  t10 _ self
hacerListaPaises: true.  t10 	 do: [:t11 | 
		 ((losJugadores at: playerTurn)
misPaises 				 includes: (t11 at: 1)) 			 ifTrue: [t7 _ t11 at: 1. 				 t6 _ t11
at: 2] 			 ifFalse: [t7 _ t11 at: 2. 				 t6 _ t11 at: 1]. 		 t1 			 ifNil: [t1
_ (submorphs at: t7) ejercitos - (submorphs at: t6) ejercitos. 				 t2 _ t7] 			
ifNotNil: [(t3 _ (submorphs at: t7) ejercitos - (submorphs at: t6) ejercitos) >
t1 					 ifTrue: [t2 _ t7. 						 t8 _ t6. 						 t1 _ t3]]].  t8 	 ifNil: [^
false].  t6 _ t8.  t7 _ t2.  t4 _ self 			 suerte: (submorphs at: t7) 			
contra: (submorphs at: t6).  t4 	 ifTrue: [pone > 2 			 ifTrue: [t5 _ (pone - 2
/ 2) asInteger. 				 t9 _ pone - t5. 				 (submorphs at: t7) 					 add: t9. 				
(submorphs at: t6) 					 add: t5. 				 (submorphs at: t6) 					 deQuienSoy:
playerTurn. 				 ^ true]. 		 ^ false].  ^ false! !  !TEGMain methodsFor: 'game
sequence'! ataque  | t1 t2 t3 t4 t5 |  estado _ 2.  Cursor crossHair 	
showWhile: [[Sensor anyButtonPressed] 			 whileFalse: [self currentWorld
displayWorldSafely; runStepMethods]. 		 t1 _ Sensor cursorPoint].  t3 _
submorphs 			 detect: [:t6 | t6 containsPoint: t1].  t2 _ t3 nombre.  PopUpMenu
confirm: t2.  ((losJugadores at: playerTurn) misPaises includes: t3 numero) 	
ifFalse: [^ self].  Cursor crossHair 	 showWhile: [[Sensor anyButtonPressed] 			
whileFalse: [self currentWorld displayWorldSafely; runStepMethods]. 		 t1 _
Sensor cursorPoint].  t4 _ submorphs 			 detect: [:t6 | t6 containsPoint: t1]. 
lim _ Array new: 2.  lim at: 1 put: t3 numero.  lim at: 2 put: t4 numero. 
(limites includes: lim) 	 ifFalse: [lim at: 1 put: t4 numero. 		 lim at: 2 put:
t3 numero. 		 (limites includes: lim) 			 ifFalse: [PopUpMenu inform: 'No son
limitrofes'. 				 ^ false]].  t5 _ self suerte: t3 contra: t4.  t5 	 ifTrue:
[self eligeEjercitos: pone jugador: playerTurn. 		 estado _ 3]! !  !TEGMain
methodsFor: 'game sequence'! continue  done _ true! !  !TEGMain methodsFor:
'game sequence'! continue: t1 
 t1 delete.  estado _ 4! !  !TEGMain methodsFor:
'game sequence'! dibuCartas: t1 hayCambio: t2 
 | t3 t4 t5 t6 t7 t8 t9 |  t3 _
(Form fromFileNamed: 'CardsDLOG.gif') asMorph.  t7 _ DrawPicture new 			
initializeWith: 'OK.gif' 			 valor: 1 			 rect: (463 @ 327 corner: 535 @ 358). 
t7 target: self.  t7 actionSelector: #cambiaCartas:.  t7 	 arguments: (Array
with: t3).  t9 _ DrawPicture new 			 initializeWith: 'Cancel.gif' 			 valor: 1
rect: (468 @ 292 corner: 530 @ 314).  t9 target: self.  t9 actionSelector:
#continue:.  t9 	 arguments: (Array with: t3).  t3 position: 90 @ 90.  t3
openInWorld.  1 	 to: t1 	 do: [:t10 | 
		 t10 caseOf: { 			 [1] -> [t6 _ 110 @
110]. 			 [2] -> [t6 _ 286 @ 110]. 			 [3] -> [t6 _ 462 @ 110]. 			 [4] -> [t6 _
198 @ 254]. 			 [5] -> [t6 _ 374 @ 254]. 			 [6] -> [t6 _ 110 @ 254]} 				
otherwise: [t6 _ 20 @ 20]. 		 t8 _ (losJugadores at: playerTurn) misCartas at:
t10. 		 t8 > 42 			 ifTrue: [t4 _ DrawCard new dibujaUnaCarta: t8] 			 ifFalse:
[t4 _ mazo at: t8. 				 t4 submorphs last noMostrar. 				 t4 submorphs last
color: (submorphs at: t8) color]. 		 t10 <= 3 			 ifTrue: [t2 					 ifTrue: [t4
submorphs first estado: true]]. 		 t4 position: t6. 		 t3 addMorphBack: t4].  t3
addMorphBack: t7.  t3 addMorphBack: t9.  self world displayWorld.  (losJugadores
at: playerTurn) esHumano 	 ifTrue: [t2 			 ifTrue: [[estado = 4] 					
whileFalse: [World doOneCycle]]. 		 estado _ 1] 	 ifFalse: [3 			 timesRepeat:
[(Delay forSeconds: 1) wait. 				 SampledSound playSoundNamed: 'chirp'. 				 t2
ifTrue: [self cambiaCartas: t3]. 				 t5 _ true. 				 (Delay forSeconds: 3)
wait. 				 t3 delete. 				 ^ t5]]! !  !TEGMain methodsFor: 'game sequence'!
dibujaUnaCarta2: t1 
 | t2 t3 t4 |  t1 openInWorld.  t1 center: Display center. 
t2 _ Player new.  t2 costume: t1.  t3 _ 1.0.  t2 show.  1 	 to: 8 	 do: [:t5 |
t4 _ 1600 - (100 * t5). 		 (Delay forMilliseconds: t4) wait. 		 FMSound
randomWeird1 play. 		 t2 setScaleFactor: t3. 		 t2 forward: 100 atRandom. 		 t2
turn: 360 atRandom. 		 self world displayWorld. 		 t3 _ t3 - 0.125].  t2 erase!
!  !TEGMain methodsFor: 'game sequence' stamp: 'edc 4/27/2004 14:41'!
eligeEjercitos: t1 jugador: t2 
 | t3 t4 t5 t6 t7 t8 t9 t10 t11 t14 |  t10 _
Array new: 9.  t9 _ Array new: 9.  1 	 to: 9 	 do: [:t12 | 
		 t10 			 at: t12
put: (Rectangle 					 left: 155 + (t12 * 45) 					 right: 195 + (t12 * 45) 					
top: (self bottom - 70) 					 bottom: (self bottom - 50)). 		 t9 at: t12 put:
0].  t11 _ self armaBatallones.  t8 _ 1.  t7 _ t11 at: 1.  t6 _ t11 at: 2.  t5 _
t11 at: 3.  t4 _ t11 at: 4.  t3 _ t11 at: 5.  t7 > 0 	 ifTrue: [1 			 to: t7 			
do: [:t13 | 
				 t8 _ t8 + 1. 				 self 					 addMorphBack: (DrawPicture new
initializeWith: 'Soldado1.gif' 							 valor: 1 							 rect: (t10 at: t13)).
t9 at: t13 put: 1]].  t6 > 0 	 ifTrue: [t14 _ t6 + t8 - 1. 		 t8 			 to: t14 			
do: [:t13 | 
				 t8 _ t8 + 1. 				 self 					 addMorphBack: (DrawPicture new
initializeWith: 'Soldado5.gif' 							 valor: 5 							 rect: (t10 at: t13)).
t9 at: t13 put: 5]].  t5 > 0 	 ifTrue: [t14 _ t5 + t8 - 1. 		 t8 			 to: t14 			
do: [:t13 | 
				 t8 _ t8 + 1. 				 self 					 addMorphBack: (DrawPicture new
initializeWith: 'Soldado10.gif' 							 valor: 10 							 rect: (t10 at: t13)).
t9 at: t13 put: 10]].  t4 > 0 	 ifTrue: [t14 _ t4 + t8 - 1. 		 t8 			 to: t14
do: [:t13 | 
				 t8 _ t8 + 1. 				 self 					 addMorphBack: (DrawPicture new
initializeWith: 'Soldado20.gif' 							 valor: 20 							 rect: (t10 at: t13)).
t9 at: t13 put: 20]].  t3 > 0 	 ifTrue: [t14 _ t3 + t8 - 1. 		 t8 			 to: t14
do: [:t13 | 
				 t8 _ t8 + 1. 				 self 					 addMorphBack: (DrawPicture new
initializeWith: 'Soldado50.gif' 							 valor: 50 							 rect: (t10 at: t13)).
t9 at: t13 put: 50]].  (t9 at: 9) 		 = 0 	 ifTrue: [self addMorphBack:
(DrawPicture new 				 initializeWith: 'Split.gif' 				 valor: 0 				 rect: (t10
at: 9); 					 target: self; 					 actionSelector: #split)]! !  !TEGMain
methodsFor: 'game sequence'! endGameFor: t1 
 ^ self halt! !  !TEGMain
methodsFor: 'game sequence'! finAtaque  done _ true.  estado _ 3! !  !TEGMain
methodsFor: 'game sequence' stamp: 'edc 4/27/2004 14:41'! finRonda  ronda _
ronda + 1.  cartel newContents: 'Ronda ' , ronda asString.  cartel center: self
center.  cartel top: self top + 10! !  !TEGMain methodsFor: 'game sequence'!
fortificar  | t1 t2 t3 t4 |  estado _ 2.  Cursor crossHair 	 showWhile: [[Sensor
anyButtonPressed] 			 whileFalse: [self currentWorld displayWorldSafely;
runStepMethods]. 		 t1 _ Sensor cursorPoint].  t2 _ submorphs 			 detect: [:t5 |
t5 containsPoint: t1].  ((losJugadores at: playerTurn) misPaises includes: t2
numero) 	 ifFalse: [^ self].  t4 _ t2 nombre.  PopUpMenu confirm: t4.  Cursor
crossHair 	 showWhile: [[Sensor anyButtonPressed] 			 whileFalse: [self
currentWorld displayWorldSafely; runStepMethods]. 		 t1 _ Sensor cursorPoint]. 
t3 _ submorphs 			 detect: [:t5 | t5 containsPoint: t1].  ((losJugadores at:
playerTurn) misPaises includes: t3 numero) 	 ifFalse: [self halt].  lim _ Array
new: 2.  lim at: 1 put: t2 numero.  lim at: 2 put: t3 numero.  (limites
includes: lim) 	 ifFalse: [lim at: 1 put: t3 numero. 		 lim at: 2 put: t2
numero. 		 (limites includes: lim) 			 ifFalse: [PopUpMenu inform: 'No son
limitrofes'. 				 ^ false]].  pone _ t2 ejercitos - 1.  t2 ejercitos: 1.  self
eligeEjercitos: pone jugador: playerTurn! !  !TEGMain methodsFor: 'game
sequence'! fortificarMaquina  | t1 t2 t3 t4 t5 t6 |  t1 _ OrderedCollection new.
t3 _ (losJugadores at: playerTurn) misPaises asSortedCollection.  t3 	 do: [:t7
| 
		 t2 _ false. 		 (submorphs at: t7) misLimites 			 do: [:t8 | (t3 includes:
t8) 					 ifFalse: [t2 _ true]]. 		 t2 			 ifFalse: [(submorphs at: t7)
ejercitos even 					 ifTrue: [t4 _ (submorphs at: t7) ejercitos - 2. 						
(submorphs at: t7) 							 ejercitos: 2] 					 ifFalse: [t4 _ (submorphs at: t7)
ejercitos - 1. 						 (submorphs at: t7) 							 ejercitos: 1]. 				 t5 _
(submorphs at: t7) misLimites size. 				 t6 _ (t4 / t5) asInteger. 				
(submorphs at: t7) misLimites 					 do: [:t9 | (submorphs at: t9) 							 add:
t6]]]! !  !TEGMain methodsFor: 'game sequence'! hacerLimites  | t1 |  1 	 to: 42
do: [:t2 | 
		 t1 _ limites 					 select: [:t3 | t3 includes: t2] 					
thenCollect: [:t4 | (t4 at: 2) 								 ~= t2 							 ifTrue: [t4 at: 2] 							
ifFalse: [t4 at: 1]]. 		 (submorphs at: t2) 			 misLimites: t1].  1 	 to: 42 	
do: [:t5 | (submorphs at: t5) 			 color: Color white]! !  !TEGMain methodsFor:
'game sequence'! leerCartas  | t1 t2 |  mazo _ OrderedCollection new.  t1 _
ReferenceStream fileNamed: 'cartas.teg'.  1 	 to: 42 	 do: [:t3 | 
		 t2 _ t1
next. 		 (t2 submorphs at: 3) lock. 		 mazo add: t2].  t1 close! !  !TEGMain
methodsFor: 'game sequence' stamp: 'edc 4/27/2004 17:39'! makeMove 
[jugadoresVivos > 1] 	 whileTrue: [submorphs 			 do: [:t1 | t1 class ==
DrawPicture 					 ifTrue: [t1 delete]]. 		 (losJugadores at: playerTurn) vive
ifFalse: [playerTurn _ playerTurn \\ 6 + 1]. 		 cartel color: (losJugadores at:
playerTurn) miColor. 		 cartel newContents: 'Ronda ' , ronda asString , ' Turno
del jugador ' , playerTurn asString. 		 cartel center: self center. 		 cartel
top: self top + 10. 		 done _ false. 		 estado _ 1. 		 serverOrClient = #server
ifTrue: [self sendMyData. playerTurn _ playerTurn \\ 6 + 1] 			 ifFalse: [ronda
caseOf: { 					 [1] -> [pone _ 5]. 					 [2] -> [pone _ 4]. 					 [3] -> [pone _
3]. 					 [4] -> [pone _ 1]. 					 [5] -> [pone _ 1]} 						 otherwise: [pone _
self cuantosEjercitos]. 				 (losJugadores at: playerTurn) misCartas size >= 3
ifTrue: [self verCartas]. 				 (losJugadores at: playerTurn) esHumano 					
ifTrue: [self eligeEjercitos: pone jugador: playerTurn. 						 self halt] 					
ifFalse: [(losJugadores at: playerTurn) misPaises size = 0 							 ifTrue: [self
muerte] 							 ifFalse: [self maquinaPone]]. 				 ronda > 5 					 ifTrue:
[submorphs last class == InformaCartas 							 ifTrue: [submorphs last delete]
ifFalse: [self 									 addMorphBack: (InformaCartas new initialize:
losJugadores)]]. 				 [done] 					 whileFalse: [World doOneCycle]. 				
serverOrClient = #cliente 					 ifTrue: [self sendMyData]. 				 ((losJugadores
at: playerTurn) esHumano 						 and: [estado = 3]) 					 ifTrue: [self
obtenerCarta]. 				 playerTurn = 6 					 ifTrue: [self finRonda]. 				
playerTurn _ playerTurn \\ 6 + 1. 				 self world displayWorld]]! !  !TEGMain
methodsFor: 'game sequence'! maquinaPone  | t1 t2 t3 t4 |  t2 _ (losJugadores
at: playerTurn) misPaises size.  t1 _ 1.  [pone > 0] 	 whileTrue: [t3 _
(losJugadores at: playerTurn) misPaises at: t1. 		 (submorphs at: t3) 			 add:
1. 		 pone _ pone - 1. 		 t1 _ t1 + 1. 		 t1 > t2 			 ifTrue: [t1 _ 1]].  ronda
> 5 	 ifTrue: [t4 _ self atacaMaquina. 		 t4 			 ifTrue: [self obtenerCarta]. 		
self fortificarMaquina].  done _ true! !  !TEGMain methodsFor: 'game sequence'!
muerte  (losJugadores at: playerTurn) 	 vive: false.  jugadoresVivos _
jugadoresVivos - 1.  done _ true! !  !TEGMain methodsFor: 'game sequence'!
obtenerCarta  | t1 |  numCarta < 45 	 ifTrue: [t1 _ cartasOrden at: numCarta. 		
(losJugadores at: playerTurn) 			 misCartas: t1. 		 t1 > 42 			 ifTrue: [self
dibujaUnaCarta2: (DrawCard new dibujaUnaCarta: t1)] 			 ifFalse: [self 					
dibujaUnaCarta2: (mazo at: t1)]].  numCarta _ numCarta + 1! !  !TEGMain
methodsFor: 'game sequence'! permitido: t1 
 estado = 1 	 ifTrue:
[((losJugadores at: playerTurn) misPaises includes: t1) 			 ifTrue: [^ true]]. 
estado = 2 | (estado = 3) 	 ifTrue: [(lim includes: t1) 			 ifTrue: [^ true]]. 
^ false! !  !TEGMain methodsFor: 'game sequence'! ponerEjercitos: t1 enPais: t2
ejEnPais at: t2 put: (ejEnPais at: t2) 		 + t1! !  !TEGMain methodsFor: 'game
sequence'! suerte: t1 contra: t2 
 self halt! !  !TEGMain methodsFor: 'game
sequence'! verCartas  | t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 |  t1 _ 0.  t2 _ 0.  t3 _
0.  t4 _ 0.  t5 _ 0.  t6 _ 0.  t7 _ 0.  t4 _ 0.  t8 _ false.  1 	 to:
(losJugadores at: playerTurn) misCartas size 	 do: [:t11 | 
		 t10 _
(losJugadores at: playerTurn) misCartas at: t11. 		 t10 >= 43 			 ifTrue: [t4 _
t4 + 1]. 		 t9 _ ((losJugadores at: playerTurn) misCartas at: t11) 					 \\\ 3.
t9 caseOf: { 			 [0] -> 
				 [t1 _ t1 + 1. 				 t5 = 0 					 ifTrue: [t5 _ t11.
t4 _ t4 + 1] 					 ifFalse: [self 							 in: t10 							 pos1: t11 							
pos2: t5]]. 			 [1] -> 
				 [t2 _ t2 + 1. 				 t6 = 0 					 ifTrue: [t6 _ t11.
t4 _ t4 + 1] 					 ifFalse: [self 							 in: t10 							 pos1: t11 							
pos2: t6]]. 			 [2] -> 
				 [t3 _ t3 + 1. 				 t7 = 0 					 ifTrue: [t7 _ t11.
t4 _ t4 + 1] 					 ifFalse: [self 							 in: t10 							 pos1: t11 							
pos2: t7]]} 				 otherwise: [Transcript open]].  t1 >= 3 | (t2 >= 3) | (t3 >= 3)
| (t4 >= 3) 	 ifTrue: [t8 _ true].  (losJugadores at: playerTurn) misCartas size
> 3 	 ifTrue: [t8 			 ifTrue: [self optimizarCambio]].  t8 	 ifTrue: [self
dibuCartas: (losJugadores at: playerTurn) misCartas size hayCambio: t8]! ! 
!TEGMain methodsFor: 'initialization'! cuantosEjercitos  | t1 t2 t3 t4 t5 t6 t7
|  t1 _ 0.  t2 _ 0.  t3 _ 0.  t4 _ 0.  t5 _ 0.  t6 _ 0.  t7 _ 0.  1 	 to: 42 	
do: [:t8 | (submorphs at: t8) deQuienSoy = playerTurn 			 ifTrue: [t1 _ t1 + 1.
(t8 >= 1 						 and: [t8 <= 4]) 					 ifTrue: [t2 _ t2 + 1]. 				 (t8 >= 5
and: [t8 <= 12]) 					 ifTrue: [t3 _ t3 + 1]. 				 (t8 >= 13 						 and: [t8 <=
20]) 					 ifTrue: [t4 _ t4 + 1]. 				 (t8 >= 21 						 and: [t8 <= 33]) 					
ifTrue: [t5 _ t5 + 1]. 				 (t8 >= 34 						 and: [t8 <= 37]) 					 ifTrue: [t6
_ t6 + 1]. 				 (t8 > 38 						 and: [t8 < 42]) 					 ifTrue: [t7 _ t7 + 1]]]. 
t1 _ 1 + (t1 / 3) asInteger.  (t2 = 4 		 or: [t6 = 4]) 	 ifTrue: [t1 _ t1 + 2]. 
(t3 = 7 		 or: [t4 = 7]) 	 ifTrue: [t1 _ t1 + 5].  t5 = 8 	 ifTrue: [t1 _ t1 +
7].  t7 = 5 	 ifTrue: [t1 _ t1 + 3].  t1 < 3 	 ifTrue: [t1 _ 3].  ^ t1! ! 
!TEGMain methodsFor: 'initialization'! dibujaRegion2: t1 color: t2 
 (miRegion
at: t1) 	 color: t2! !  !TEGMain methodsFor: 'initialization'! distribuyePaises 
| t1 t2 t3 t4 t5 |  t2 _ 42 / jugadoresVivos.  t3 _ OrderedCollection new.  [t3
size < 42] 	 whileTrue: [(t3 includes: (t1 _ 42 atRandom)) 			 ifFalse: [t3 add:
t1]].  t4 _ 1.  1 	 to: jugadoresVivos 	 do: [:t6 | 1 			 to: t2 			 do: [:t7 |
t5 _ t3 at: t4. 				 (losJugadores at: t6) 					 misPaises: t5. 				 (submorphs
at: t5) 					 deQuienSoy: t6. 				 t4 _ t4 + 1]]! !  !TEGMain methodsFor:
'initialization'! elijeColor  | t1 t2 t3 |  t1 _ Array new: 16.  t1 	 at: 1 	
put: (Color 			 r: 1.0 			 g: 5000 / 65535 			 b: 5000 / 65535).  t1 	 at: 2 	
put: (Color 			 r: 1.0 			 g: 25000 / 65535 			 b: 5000 / 65535).  t1 	 at: 3 	
put: (Color 			 r: 1.0 			 g: 45000 / 65535 			 b: 5000 / 65535).  t1 	 at: 4 	
put: (Color 			 r: 65000 / 65535 			 g: 65000 / 65535 			 b: 25000 / 65535).  t1
at: 5 	 put: (Color 			 r: 65000 / 65535 			 g: 65000 / 65535 			 b: 500 /
65535).  t1 	 at: 6 	 put: (Color 			 r: 45000 / 65535 			 g: 45000 / 65535 			
b: 500 / 65535).  t1 	 at: 7 	 put: (Color 			 r: 25000 / 65535 			 g: 25000 /
65535 			 b: 500 / 65535).  t1 	 at: 8 	 put: (Color 			 r: 5000 / 65535 			 g:
65535 / 65535 			 b: 20000 / 65535).  t1 	 at: 9 	 put: (Color 			 r: 5000 /
65535 			 g: 65535 / 65535 			 b: 65535 / 65535).  t1 	 at: 10 	 put: (Color 			
r: 5000 / 65535 			 g: 45000 / 65535 			 b: 65535 / 65535).  t1 	 at: 11 	 put:
(Color 			 r: 5000 / 65535 			 g: 25000 / 65535 			 b: 65535 / 65535).  t1 	 at:
12 	 put: (Color 			 r: 5000 / 65535 			 g: 5000 / 65535 			 b: 65535 / 65535). 
t1 	 at: 13 	 put: (Color 			 r: 1.0 			 g: 5000 / 65535 			 b: 25000 / 65535). 
t1 	 at: 14 	 put: (Color 			 r: 1.0 			 g: 5000 / 65535 			 b: 45000 / 65535). 
t1 	 at: 15 	 put: (Color 			 r: 1.0 			 g: 5000 / 65535 			 b: 65000 / 65535). 
t1 	 at: 16 	 put: (Color 			 r: 45000 / 65535 			 g: 5000 / 65535 			 b: 65535
/ 65535).  t2 _ AlignmentMorph newColumn.  t3 _ OrderedCollection new.  1 	 to:
16 	 do: [:t4 | t3 add: (SimpleButtonMorph new label: 'Color '; 					
				
color: (t1 at: t4); 					 target: self; 					 actionSelector: #miColor:;
arguments: (Array 						 with: (t1 at: t4)))].  t3 	 reverseDo: [:t5 | t2
addMorph: t5].  t2 position: 650 @ 30.  self addMorph: t2.  cartel _ t2! ! 
!TEGMain methodsFor: 'initialization'! informaCartas  self halt.  self 	
addMorphBack: (InformaCartas new initialize: losJugadores)! !  !TEGMain
methodsFor: 'initialization'! initialize  | t1 t2 t3 t4 |  self setFolder. 
(StreamingMP3Sound onFileNamed: NewFolder pathName , FileDirectory slash ,
'combat.mp3') play.  super initialize.  self remoteCommServer.  self extent: 750
@ 490.  self color: Color paleBlue.  self borderWidth: 2.  self position: 18 @
0.  self toggleStickiness.  self openInWorld.  miArchivo _ FileStream
readOnlyFileNamed: 'PRUEBA'.  cartasOrden _ OrderedCollection new.  [cartasOrden
size < 44] 	 whileTrue: [(cartasOrden includes: (t4 _ 44 atRandom)) 			 ifFalse:
[cartasOrden add: t4]].  losJugadores _ Array new: 6.  1 	 to: 6 	 do: [:t5 |
losJugadores at: t5 put: Jugador new initialize].  (losJugadores at: 1) 	
esHumano: true.  jugadoresVivos _ 6.  1 	 to: 42 	 do: [:t6 | 
		 t2 _ String
new. 		 t2 _ self leerArchivo. 		 t3 _ OrderedCollection new. 		 t1 _ Point
readFromString: self leerArchivo. 		 t3 add: t1. 		 10 			 timesRepeat: [t1 _
Point readFromString: self leerArchivo. 				 t3 add: t1]. 		 self addMorphBack:
(PaisMorph new nombre: t2 limites: t3; 					 numero: t6)].  self
distribuyePaises.  self miColor.  ronda _ 1.  estado _ 1.  numCarta _ 1. 
playerTurn _ 1.  cambiosTotales _ 0.  self initialize2! !  !TEGMain methodsFor:
'initialization' stamp: 'edc 4/27/2004 16:27'! initialize2  | t1 t2 t3 t4 | 
limites _ #(#(1 2) #(1 3) #(2 3) #(2 4) #(3 2) #(3 4) #(3 38) #(4 3) #(4 5) #(5
6) #(5 7) #(6 5) #(6 7) #(6 9) #(6 10) #(7 8) #(7 9) #(8 9) #(8 11) #(8 12) #(9
10) #(9 12) #(10 13) #(11 27) #(12 13) #(13 14) #(14 15) #(14 18) #(15 16) #(15
18) #(15 19) #(16 17) #(16 20) #(16 20) #(16 21) #(16 22) #(16 23) #(17 19) #(18
19) #(19 38) #(20 16) #(20 21) #(20 23) #(20 38) #(20 39) #(21 25) #(22 23) #(22
24) #(22 29) #(23 24) #(23 39) #(23 40) #(24 33) #(25 21) #(25 29) #(29 33) #(33
29) #(38 39) #(38 40) #(38 41) #(40 41) #(20 23) #(19 20) #(39 40) #(25 26) #(26
27) #(31 32) #(27 32) #(30 32) #(29 30) #(34 35) #(37 35) #(35 36) #(11 12) #(40
42) #(42 41) #(34 37) #(36 37) #(33 34) #(24 29) #(28 30) #(25 30) #(18 17) #(18
19) #(17 20) #(21 22) #(21 29) #(25 28) #(26 28) #(26 31) #(28 31) #(30 31) ). 
t1 _ SimpleButtonMorph new label: 'Ataque'; 				 target: self; 				
actionSelector: #ataque; 				 position: 180 @ 460; 				 bottom: self bottom -
20.  self addMorphBack: t1.  t1 _ SimpleButtonMorph new label: 'Fin Ataque';
target: self; 				 actionSelector: #finAtaque; 				 position: 280 @ 460; 				
bottom: self bottom - 20.  self addMorphBack: t1.  t2 _ SimpleButtonMorph new
label: 'Continuar'; 				 target: self; 				 actionSelector: #continue; 				
position: 380 @ 460; 				 bottom: self bottom - 20.  self addMorphBack: t2.  t3
_ SimpleButtonMorph new label: 'Fortificar'; 				 target: self; 				
actionSelector: #fortificar; 				 position: 480 @ 460; 				 bottom: self bottom
- 20.  self addMorphBack: t3.  t4 _ SimpleButtonMorph new label: 'DEBUG'; 				
target: self; 				 actionSelector: #debug; 				 position: 580 @ 460; 				
bottom: self bottom - 20.  self addMorphBack: t4.  done _ true.  cartel _
TextMorph borderedPrototype.  cartel 	 beAllFont: (StrikeFont familyName:
#ComicBold size: 18).  cartel color: Color red.  cartel newContents: 'SqueakRos
fight the evil '.  cartel extent: self width - 30 @ 40.  cartel center: self
center.  cartel top: self top + 10.  self addMorphBack: cartel.  World
displayWorldSafely.  (Delay forSeconds: 5) wait.  self leerCartas.  self
startStepping.  done _ false.  self serverOrClient = #server 	 ifTrue:
[TEGServer start] 	 ifFalse: [TEGClient start. [activeSocket dataAvailable]
whileFalse. 	
 self askMyData].  [done] whileFalse.  self makeMove! !  !TEGMain
methodsFor: 'initialization'! initializeN  | t1 |  cartasOrden _
OrderedCollection new.  [cartasOrden size < 44] 	 whileTrue: [(cartasOrden
includes: (t1 _ 44 atRandom)) 			 ifFalse: [cartasOrden add: t1]].  losJugadores
_ Array new: 6.  1 	 to: 6 	 do: [:t2 | losJugadores at: t2 put: Jugador new
initialize].  (losJugadores at: 1) 	 esHumano: true.  jugadoresVivos _ 6. 
serverOrClient = #server 	 ifTrue: [self distribuyePaises. 		 self miColor]. 
ronda _ 1.  estado _ 1.  numCarta _ 1.  playerTurn _ 1.  cambiosTotales _ 0. 
self initialize2! !  !TEGMain methodsFor: 'initialization'! initializeP  | t1 t2
t3 t4 |  self setFolder.  super initialize.  self extent: 750 @ 490.  self
color: Color paleBlue.  self borderWidth: 2.  self position: 18 @ 0.  self
toggleStickiness.  self openInWorld.  miArchivo _ FileStream readOnlyFileNamed:
'PRUEBA'.  cartasOrden _ OrderedCollection new.  [cartasOrden size < 44] 	
whileTrue: [(cartasOrden includes: (t4 _ 44 atRandom)) 			 ifFalse: [cartasOrden
add: t4]].  losJugadores _ Array new: 6.  1 	 to: 6 	 do: [:t5 | losJugadores
at: t5 put: Jugador new initialize].  (losJugadores at: 1) 	 esHumano: true. 
jugadoresVivos _ 6.  1 	 to: 42 	 do: [:t6 | 
		 t2 _ String new. 		 t2 _ self
leerArchivo. 		 t3 _ OrderedCollection new. 		 t1 _ Point readFromString: self
leerArchivo. 		 t3 add: t1. 		 10 			 timesRepeat: [t1 _ Point readFromString:
self leerArchivo. 				 t3 add: t1]. 		 self addMorphBack: (PaisMorph new nombre:
t2 limites: t3; 					 numero: t6)].  self distribuyePaises.  self miColor. 
ronda _ 1.  estado _ 1.  numCarta _ 1.  playerTurn _ 1.  cambiosTotales _ 0. 
self initialize2! !  !TEGMain methodsFor: 'initialization'! leerArchivo  | t1 t2
|  t2 _ String new.  [miArchivo atEnd] 	 whileFalse: [t1 _ miArchivo next
asCharacter. 		 t1 asciiValue = 13 			 ifTrue: [^ t2]. 		 t2 _ t2 , t1
asString]! !  !TEGMain methodsFor: 'initialization'! miColor  | t1 t2 |  t1 _
Color 			 wheel: 6 			 saturation: 0.7 			 brightness: 0.9.  t2 _ 1.  t1 	 do:
[:t3 | 
		 (losJugadores at: t2) 			 miColor: t3. 		 t2 _ t2 + 1].  submorphs 	
do: [:t4 | t4 color: (losJugadores at: t4 deQuienSoy) miColor]! !  !TEGMain
methodsFor: 'initialization' stamp: 'edc 4/27/2004 14:43'! miColor: t1 
 1 	 to:
6 	 do: [:t2 | (losJugadores at: t2) miColor 			 ifNil: [(losJugadores at: t2)
miColor: t1. 				 (losJugadores at: t2) misPaises 					 do: [:t3 | (submorphs
at: t3) 							 color: t1]. 				 t2 = 6 					 ifTrue: [cartel delete. 						
cartel _ TextMorph borderedPrototype.  cartel 	 beAllFont: (StrikeFont
familyName: #ComicBold size: 18).  cartel color: Color red.  cartel newContents:
'SqueakRos fight the evil '.  cartel extent: self width - 30 @ 40.  cartel
center: self center.  cartel top: self top + 10.  self addMorphBack: cartel.
self startStepping. 						 self makeMove]. 				 ^ t2]]! !  !TEGMain methodsFor:
'initialization'! repeat  | t1 t2 t3 |  t1 _ (losJugadores at: playerTurn)
misCartas size.  t2 _ 1.  [t2 > t1] 	 whileFalse: [((losJugadores at:
playerTurn) misCartas at: t2) 				 \\\ 3 = 0 			 ifFalse: [t3 _ (losJugadores
at: playerTurn) misCartas at: t2. 				 (losJugadores at: playerTurn) misCartas
at: t2 					 put: ((losJugadores at: playerTurn) misCartas at: t1). 				
(losJugadores at: playerTurn) misCartas at: t1 put: t3. 				 t1 _ t1 - 1]. 		 t2
_ t2 + 1]! !  !TEGMain methodsFor: 'initialization' stamp: 'edc 4/27/2004
14:46'! verificarCambio: t1 
 | t2 t3 t4 t5 t6 |  t3 _ 0.  t4 _ 0.  t5 _ 0.  t2
_ t1 submorphs 			 count: [:t7 | t7 class name = 'DrawCard' 					 and: [t7
submorphs first estado = true]].  t2 > 3 	 ifTrue: ["(StreamingMP3Sound
onFileNamed: NewFolder pathName , FileDirectory slash , 'tramposo.mp3') play."
cartel newContents: 'Tramposo '. 		 cartel center: t1 center. 		 t1 addMorph:
cartel].  t6 _ t1 submorphs 			 select: [:t7 | t7 class name = 'DrawCard' 					
and: [t7 submorphs first estado = true]] 			 thenCollect: [:t8 | t8 numero \\\
3].  t2 _ 0.  t6 	 do: [:t9 | t9 caseOf: { 			 [0] -> 
				 [t3 = 0 					
ifTrue: [t3 _ 1. 						 t2 _ t2 + 1]]. 			 [1] -> 
				 [t4 = 0 					 ifTrue:
[t4 _ 1. 						 t2 _ t2 + 1]]. 			 [2] -> 
				 [t5 = 0 					 ifTrue: [t5 _ 1.
t2 _ t2 + 1]]} 				 otherwise: [Transcript open]].  t6 _ t1 submorphs 			
select: [:t7 | t7 class name = 'DrawCard' 					 and: [t7 submorphs first estado
= true]] 			 thenCollect: [:t8 | t8 numero > 42 					 ifTrue: [t2 _ t2 + 1]]. 
t2 = 3 	 ifTrue: [^ true].  "(StreamingMP3Sound onFileNamed: NewFolder pathName
, FileDirectory slash , 'tramposo.mp3') play."  cartel newContents: 'Tramposo '.
cartel center: t1 center.  t1 addMorph: cartel! ! 
 !TEGMain methodsFor:
'menus'! addCustomMenuItems: t1 hand: t2 
 super addCustomMenuItems: t1 hand:
t2.  t1 addLine.  self addMenuItemsTo: t1 hand: t2! !  !TEGMain methodsFor:
'menus'! addMenuItemsTo: t1 hand: t2 
 t1 	 add: 'new game' 	 target: self 	
action: #newGame.  t1 	 add: 'reset...' 	 target: self 	 action: #reset.  t1 	
add: 'grabar estado' 	 target: self 	 action: #grabaEstado.  t1 	 add: 'leer
estado' 	 target: self 	 action: #leerEstado.  t1 	 add: 'debug' 	 target: self
action: #debug! !  !TEGMain methodsFor: 'menus'! cambiaCartas: t1 
 | t2 t3 t4 |
estado _ 4.  t3 _ #(4 6 8 10 12 15 ).  (losJugadores at: playerTurn) esHumano 	
ifTrue: [t4 _ self verificarCambio: t1] 	 ifFalse: [t4 _ true].  t1 submorphs 	
do: [:t5 | t5 class name = 'DrawCard' 			 ifTrue: [t5 submorphs first estado
ifTrue: [t2 _ (losJugadores at: playerTurn) misPaises includes: t5 numero.
t2 							 ifTrue: [(submorphs at: t5 numero) 									 add: 2]. 						
(losJugadores at: playerTurn) misCartas 							 remove: t5 numero 							
ifAbsent: []]]].  cambiosTotales _ cambiosTotales + 1.  cambiosTotales < 7 	
ifTrue: [pone _ pone + t3 at: cambiosTotales] 	 ifFalse: [pone _ pone + 15 + 5 *
(cambiosTotales - 6)].  t1 delete! !  !TEGMain methodsFor: 'menus'!
hacerListaPaises: t1 
 | t2 t3 |  t2 _ Set new.  (losJugadores at: playerTurn)
misPaises 	 do: [:t4 | limites 			 do: [:t5 | (t5 includes: t4) 					 ifTrue:
[t2 add: t5]]].  t3 _ t2 copy.  t1 	 ifTrue: [t2 			 do: [:t6 | (((losJugadores
at: playerTurn) misPaises 							 includes: (t6 at: 1)) 						 and:
[(losJugadores at: playerTurn) misPaises 								 includes: (t6 at: 2)]) 					
ifTrue: [t3 remove: t6]]] 	 ifFalse: [t2 			 do: [:t6 | (((losJugadores at:
playerTurn) misPaises 							 includes: (t6 at: 1)) 						 and: [(losJugadores
at: playerTurn) misPaises 								 includes: (t6 at: 2)]) 					 ifFalse: [t3
remove: t6]]].  ^ t3! !  !TEGMain methodsFor: 'menus'! reset  ^ self! ! 
!TEGMain methodsFor: 'sound effects'! soundEffects  | t1 t2 |  t1 _ 3 atRandom. 
t2 _ 'batalla' , t1 asString , '.wav'.  (SampledSound fromWaveFileNamed: t2)
play! ! 
 !TEGMain methodsFor: 'network'! remoteCommClient  | t1 t2 t3 t4 |  t2
_ Array new: 2.  t3 _ Array new: 42.  t1 _ 'localhost'.  activeSocket _ Socket
newTCP.  activeSocket 	 connectTo: (NetNameResolver addressForName: t1) 	 port:
8000.  activeSocket waitForConnectionUntil: Socket standardDeadline.  t2 at: 1
put: 'L'.  t2 at: 2 put: losJugadores.  self nextCommand: t2.  t2 at: 1 put:
'C'.  t2 at: 2 put: cartasOrden.  self nextCommand: t2.  t2 at: 1 put: 'J'.  t2
at: 2 put: jugadoresVivos.  self nextCommand: t2.  t2 at: 1 put: 'P'.  t2 at: 2
put: playerTurn.  self nextCommand: t2.  t2 at: 1 put: 'R'.  t2 at: 2 put:
ronda.  self nextCommand: t2.  t2 at: 1 put: 'N'.  t2 at: 2 put: numCarta.  self
nextCommand: t2.  t2 at: 1 put: 'T'.  t2 at: 2 put: cambiosTotales.  self
nextCommand: t2.  1 	 to: 42 	 do: [:t5 | 
		 t4 _ Array new: 2. 		 t4 at: 1
put: (submorphs at: t5) ejercitos. 		 t4 at: 2 put: (submorphs at: t5)
deQuienSoy. 		 t3 at: t5 put: t4].  t2 at: 1 put: 'E'.  t2 at: 2 put: t3.  self
nextCommand: t2! !  !TEGMain methodsFor: 'network'! remoteCommServer  | t1 t2 | 
Socket initializeNetwork.  activeSocket _ Socket newTCP.  activeSocket listenOn:
8000.  [true] 	 whileTrue: [activeSocket 			 waitForConnectionUntil: (Socket
deadlineSecs: 30). 		 [activeSocket isConnected] 			 whileTrue: [activeSocket
dataAvailable 					 ifTrue: [t1 _ activeSocket getObject. 						 self halt.
t2 _ (StringCompiler compileString: t1) value. 						 activeSocket sendObject:
t2]]].  activeSocket closeAndDestroy! ! 
 !TEGMain methodsFor:
'sending-receiving objects' stamp: 'edc 4/27/2004 17:43'! askMyData  | estadoTEG
losPaises losPaisesData elPais soyDe nuevoColor |  estadoTEG _ activeSocket
getObject.  self 	 losJugadores: (estadoTEG at: 1).  self 	 cartasOrden:
(estadoTEG at: 2).  self 	 ronda: (estadoTEG at: 3).  self 	 numCarta:
(estadoTEG at: 4).  self 	 cambiosTotales: (estadoTEG at: 5).  losPaises _
estadoTEG at: 6.  1 	 to: 42 	 do: [:pais | 
		 losPaisesData _ losPaises at:
pais. 		 elPais _ self submorphs at: pais. 		 elPais 			 ejercitos:
(losPaisesData at: 1). 		 elPais 			 deQuienSoy: (losPaisesData at: 2). 		 soyDe
_ elPais deQuienSoy. 		 nuevoColor _ (self losJugadores at: soyDe) miColor. 		
elPais redrawInColor: nuevoColor]. self playerTurn: ( estadoTEG at: 7)! ! 
!TEGMain methodsFor: 'sending-receiving objects' stamp: 'edc 4/27/2004 17:41'!
sendMyData  | estadoTEG losPaises elPais losPaisesData |  activeSocket _
socketList at: playerTurn.  (activeSocket isValid 		 and: [activeSocket
isConnected]) 	 ifTrue: [estadoTEG _ OrderedCollection new. 		 estadoTEG add:
self losJugadores. 		 estadoTEG add: self cartasOrden. 		 estadoTEG add: self
ronda. 		 estadoTEG add: self numCarta. 		 estadoTEG add: self cambiosTotales.
losPaises _ Array new: 42. 		 1 			 to: 42 			 do: [:pais | 
				 elPais _ self
submorphs at: pais. 				 losPaisesData _ Array new: 2. 				 losPaisesData at: 1
put: elPais ejercitos. 				 losPaisesData at: 2 put: elPais deQuienSoy. 				
losPaises at: pais put: losPaisesData]. 		 estadoTEG add: losPaises.  estadoTEG
add:  self playerTurn. 		 activeSocket sendObject: estadoTEG].  [activeSocket
dataAvailable] whileFalse.  self askMyData! !  "-- -- -- -- -- -- -- -- -- -- --
-- -- -- -- -- -- -- "!  TEGMain class  instanceVariableNames: ''!  !TEGMain
class methodsFor: 'as yet unclassified'! debug  self maquinaPone! !  !TEGMain
class methodsFor: 'as yet unclassified'! new  | t1 t2 |  FileDirectory default
pathParts last = 'STEG' 	 ifFalse: [self setFolder].  t1 _ FileStream
readOnlyFileNamed: 'TEGBlank.morph'.  t2 _ t1 fileInObjectAndCode.  t2
openCenteredInWorld.  t2 initializeN! !  !TEGMain class methodsFor: 'as yet
unclassified'! reset  | t1 t2 |  FileDirectory default pathParts last = 'STEG' 	
ifFalse: [self setFolder].  t1 _ FileStream readOnlyFileNamed: 'TEGBlank.morph'.
t2 _ t1 fileInObjectAndCode.  t2 leerEstado.  t2 openCenteredInWorld.  t2
initialize2! !  !TEGMain class methodsFor: 'as yet unclassified'! resetFolder 
FileDirectory setDefaultDirectory: OldFolder! !  !TEGMain class methodsFor: 'as
yet unclassified'! setFolder  OldFolder _ FileDirectory default pathName. 
FileDirectory setDefaultDirectory: OldFolder , FileDirectory slash , 'STEG'. 
NewFolder _ FileDirectory default! !  !TEGMain class methodsFor: 'as yet
unclassified'! startAsCliente  | t1 t2 |  FileDirectory default pathParts last =
'STEG' 	 ifFalse: [self setFolder].  t1 _ FileStream readOnlyFileNamed:
'TEGBlank.morph'.  t2 _ t1 fileInObjectAndCode.  t2 openCenteredInWorld.  t2
serverOrClient: #cliente.  t2 initializeN! !  !TEGMain class methodsFor: 'as yet
unclassified'! startAsServer  | t1 t2 |  FileDirectory default pathParts last =
'STEG' 	 ifFalse: [self setFolder].  t1 _ FileStream readOnlyFileNamed:
'TEGBlank.morph'.  t2 _ t1 fileInObjectAndCode.  t2 openCenteredInWorld.  t2
serverOrClient: #server.  t2 initializeN! ! 
 Object subclass: #TEGServer 
instanceVariableNames: 'port socketList activeClient addClient ' 
classVariableNames: ''  poolDictionaries: ''  category: 'Morphic-TEG'! 
!TEGServer methodsFor: 'as yet unclassified' stamp: 'edc 4/27/2004 14:58'!
addClient ^ addClient! !  !TEGServer methodsFor: 'as yet unclassified' stamp:
'edc 4/27/2004 15:11'! addClient: t1 
 | t2 instanciaTEG |  t2 _ NetNameResolver
stringFromAddress: t1 remoteAddress.  Transcript show: t2; 		 tab.  Transcript
show: t1 getData; 		 cr.  activeClient _ activeClient + 1.  socketList 	 at: t2
ifAbsent: [socketList at: activeClient put: t1].  activeClient = 2 	 ifTrue:
[instanciaTEG _ ActiveWorld submorphs 			 detect: [:t | t class == TEGMain].
instanciaTEG socketList: self socketList ]. ! !  !TEGServer methodsFor: 'as yet
unclassified'! newEar  | t1 |  t1 _ Socket 			 tcpCreateIfFail: [self error:
'Unable to create a socket'].  t1 listenOn: port backlogSize: 6.  ^ t1! ! 
!TEGServer methodsFor: 'as yet unclassified'! newProcess  | t1 |  t1 _ [self
serviceLoop] newProcess.  t1 priority: self class priority.  ^ t1! !  !TEGServer
methodsFor: 'as yet unclassified'! nextClient  self halt! !  !TEGServer
methodsFor: 'as yet unclassified'! port: t1 
 port _ t1! !  !TEGServer
methodsFor: 'as yet unclassified' stamp: 'edc 4/27/2004 11:56'! ringLoop  | t1
t2 t3 instanciaTEG elPais estadoTEG losPaises losPaisesData |  instanciaTEG _
ActiveWorld submorphs 			 detect: [:t | t class == TEGMain].  [true] 	
whileTrue: [activeClient _ activeClient \\ 2 + 1. 		 t1 _ socketList at:
activeClient. 		 (t1 isValid 				 and: [t1 isConnected]) 			 ifTrue:
[instanciaTEG activeSocket: t1.  estadoTEG _ OrderedCollection new. 				
estadoTEG add: instanciaTEG losJugadores. 				 estadoTEG add: instanciaTEG
cartasOrden. 				 estadoTEG add: instanciaTEG ronda. 				 estadoTEG add:
instanciaTEG numCarta. 				 estadoTEG add: instanciaTEG cambiosTotales. 				
losPaises _ Array new: 42. 				 1 					 to: 42 					 do: [:pais | 
						 elPais
_ instanciaTEG submorphs at: pais. 						 losPaisesData _ Array new: 2. 						
losPaisesData at: 1 put: elPais ejercitos. 						 losPaisesData at: 2 put:
elPais deQuienSoy. 						 losPaises at: pais put: losPaisesData]. 				 estadoTEG
add: losPaises. 				 t1 sendObject: estadoTEG. 				 [t1 dataAvailable]
whileFalse. 				 instanciaTEG askMyData. 				 self halt. 				 t3 _
NetNameResolver stringFromAddress: t1 remoteAddress. 				 Transcript show: t3;
tab. 				 Transcript show: t2 printString; 						 cr. 				 self halt]]! ! 
!TEGServer methodsFor: 'as yet unclassified'! serviceLoop  | t1 |  t1 _ nil. 
ear _ self newEar.  [true] 	 whileTrue: [[t1 isNil] 			 whileTrue: [t1 _ ear
waitForAcceptUntil: Socket standardDeadline]. 		 t1 isConnected 			 ifTrue:
[addClient 					 ifTrue: [self addClient: t1] 					 ifFalse: [self nextClient].
t1 _ nil] 			 ifFalse: [self error: 'Accepted unconnected socket']]! ! 
!TEGServer methodsFor: 'as yet unclassified' stamp: 'edc 4/27/2004 15:10'!
socketList ^ socketList! !  !TEGServer methodsFor: 'as yet unclassified' stamp:
'edc 4/26/2004 15:34'! start  | listener |  socketList _ Dictionary new. 
activeClient _ 0.  addClient _ true.  listener _ TcpListener 			 on: 8000 			
handler: [:socket | addClient 					 ifTrue: [self addClient: socket]].  listener
forkAndListenWhile: [addClient].  ! !  !TEGServer methodsFor: 'as yet
unclassified' stamp: 'edc 4/27/2004 09:02'! stop  Socket  allInstancesDo: [ :i |
i closeAndDestroy].  socketList  _ nil.  self becomeForward: nil! !  "-- -- --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!  TEGServer class 
instanceVariableNames: ''!  !TEGServer class methodsFor: 'defaults'! defaultPort
^ 8000! !  !TEGServer class methodsFor: 'defaults'! priority  ^ Processor
lowIOPriority! !  !TEGServer class methodsFor: 'defaults'! start  Transcript
open.  Transcript show: 'TEGServer starting...'; 		 cr.  ^ self startOn: self
defaultPort! ! 
 !TEGServer class methodsFor: 'running'! startOn: t1 
 ^ self
new port: t1; 		 start! !  !TEGServer class methodsFor: 'running'! stop  self 	
allInstancesDo: [:t1 | t1 stop]! ! 
 ImageMorph subclass: #TEGStartButton 
instanceVariableNames: ''  classVariableNames: ''  poolDictionaries: '' 
category: 'Morphic-TEG'!  !TEGStartButton methodsFor: 'menu'! addMenuItemsTo: t1
hand: t2 
 | t3 |  t3 _ MenuMorph new.  t3 color: Color blue.  t3 	 color: (t3
color alpha: 0.5).  t3 	 add: 'Soy server' 	 target: TEGMain 	 action:
#startAsServer.  t3 	 add: 'Soy cliente ' 	 target: TEGMain 	 action:
#startAsCliente.  t3 items 	 do: [:t4 | t4 color: Color yellow; 				
			 font:
(StrikeFont 					 familyName: 'Comic Bold' 					 size: 18 					 emphasized: 1)].
t3 invokeModal! ! 
 !TEGStartButton methodsFor: 'event handling'!
handlesMouseDown: t1 
 ^ true! !  !TEGStartButton methodsFor: 'event handling'!
mouseDown: t1 
 | t2 |  t1 yellowButtonPressed 	 ifFalse: [^ t1 hand
waitForClicksOrDrag: self event: t1].  t2 _ MenuMorph new defaultTarget: self. 
self addMenuItemsTo: t2 hand: t1 hand.  t2 popUpEvent: t1 in: self world! !

#484 De: Oca Emilio <eoca@...>
Fecha: Mar, 27 de Abr, 2004 12:48 pm
Asunto: RE: FW: Looking for people
emiliooca
Sin conexión Sin conexión
Enviar correo Enviar correo
 
> Tenés razón, esperaremos algo mas a nuestro alcance.
Hey, yo hablaba por mi. En Squeak, esto esta tan al alcance
como las ganas que tengas de que lo este.

> Me alegro que  progrese tu tesis, lástima no poder ayudarte.
Se agradece.

	 Emilio

> Nos leemos.
> Edgar
>
>
> On 26/04/04 09:54, "Oca Emilio" <eoca@...> wrote:
>
> > Si, si, lo vi, interesante, pero...
> > Por lo pronto, ocupadisimo en mi tesis respuesta frecuente
> que ya le di a
> > mas de un amigo que me queria enganchar en algo. Pero ya
> falta menos.
> > En segundo lugar, yo no me calificaria como que really
> understando the
> > underpinnings of Squeak.
> > Y tercero, puedo hacer algun aporte en Tex (no text)(a
> cross platform type
> > solution) y nada en video.
> >
> > Como siempre estoy dispuesto a escuchar, opinar, revisar,
> pero lo que se
> > dice trabajar, trabajar, por un tiempo me va a costar un poco.
> >
> > Saludos
> >
> > Emilio

#483 De: "Lic. Edgar J. De Cleene" <edgardec2001@...>
Fecha: Mar, 27 de Abr, 2004 10:29 am
Asunto: Re: FW: Looking for people
edgardec2001
Sin conexión Sin conexión
Enviar correo Enviar correo
 
On 26/04/04 09:54, "Oca Emilio" <eoca@...> wrote:

> Si, si, lo vi, interesante, pero...
> Por lo pronto, ocupadisimo en mi tesis respuesta frecuente que ya le di a
> mas de un amigo que me queria enganchar en algo. Pero ya falta menos.
> En segundo lugar, yo no me calificaria como que really understando the
> underpinnings of Squeak.
> Y tercero, puedo hacer algun aporte en Tex (no text)(a cross platform type
> solution) y nada en video.
>
> Como siempre estoy dispuesto a escuchar, opinar, revisar, pero lo que se
> dice trabajar, trabajar, por un tiempo me va a costar un poco.
>
> Saludos
>
> Emilio
Emilio:
Tenés razón, esperaremos algo mas a nuestro alcance.
Me alegro que  progrese tu tesis, lástima no poder ayudarte.
Nos leemos.
Edgar

#482 De: "Lic. Edgar J. De Cleene" <edgardec2001@...>
Fecha: Lun, 26 de Abr, 2004 9:36 pm
Asunto: [TEG] Segundo experimento de protocolo de red
edgardec2001
Sin conexión Sin conexión
Enviar correo Enviar correo
 
A todos los interesados, les cuento.
Esta mañana me acompañaron Mauricio y Hernán y tuvimos toda clase de
problemas, por lo que en la facu no adelantamos mucho.
Yo segu…í en casa y corregí el SqueakLight para que corra en forma aceptable
el  TEG y use bien la red.
Tengo andando en mis dos máquinas una versión que detecta bien los clientes
y les manda objetos.
Tuve que usar TCPListener en vez del código del VNCServer.
La razón es que el código del VNCServer queda en un lazo imposible de
interrumpir al largar el server.
Aparentemente el TCPListener no tiene este problema , ni el de lagar varias
veces el server.
Como los objetos a mandar son muchos y esto es muy preliminar, todavía hay
que pulir mucho el protocolo.
Por ahora dejo, seguiré mañana a la mañana y si hay avances, les cuento.

Edgar

Agrego los links que le prometí a Hernán
http://ar.groups.yahoo.com/group/squeakRos/    SqueakRos / Grupo
http://swiki.agro.uba.ar/small_land/    Swiki de la UBA
http://ar.geocities.com/edgardec2001/Welcome.html    SqueakRos / Tutoriales
http://209.143.91.36/super    super Swiki
http://brain.cs.uiuc.edu/CampSmalltalk    CampSmalltalk: Camp Smalltalk
http://groups.yahoo.com/group/squeak/    Yahoo! Groups : squeak
http://coweb.cc.gatech.edu/cs2340/    CS2340 CoWeb
http://lists.squeakfoundation.org/pipermail/squeak-dev/    The Squeak-dev
Archives
http://minnow.cc.gatech.edu/squeak    Squeak!/minnow
http://smalltalk-programming.com/    Smalltalk-Programming
http://sourceforge.net/projects/squeak/    SourceForge: Project Info -
Squeak
http://squeak.cs.uiuc.edu/    http://squeak.cs.uiuc.edu/
http://st-www.cs.uiuc.edu/    UIUC Smalltalk Archive
http://swiki.squeakfoundation.org/squeakfoundation    Squeak Foundation
Swiki
http://swiki.squeakfoundation.org/stablesqueak    Stable Squeak Swiki
http://www.goodstart.com/greatquestions.html    Smalltalk
http://www.odellsoft.com/sunitbrowser/    SUnit Browser
http://www.smalltalkchronicles.net/edition3-2/Pages/articles.htm    Articles
http://www.squeakland.org/    Squeakland
http://www.squeaknews.com/    SqueakNews
http://smalltalking.swiki.net/1    http:// Smalltalking
http://www.netjam.org/squat/releases/    Squat
http://wuarchive.wustl.edu/languages/smalltalk/Smalltalk/Squeak/    Archivos
de la Universidad de Washington
http://www.esug.org/    ESUG
http://www.smalltalking.net/Archive/index.htm    Archivos hist&oacute;ricos
Smalltalking
http://squeakros.swiki.net/    SqueakRosSwiki
http://www.knowledgearchitects.net/squeakchannel/    Sitio Laurence Rozier
http://members.aol.com/kgb1001001/Companion/Companion.htm    The Design
Patterns Smalltalk Companion
http://people.squeakfoundation.org/    Squeak People
file://localhost/Macintosh%20HD/Users/edgar/Public/SqueakDevelop/CD%20Aleman
es/wiki-mirror/minnow.cc.gatech.edu/squeak.html    Squeak Swiki local

#481 De: Oca Emilio <eoca@...>
Fecha: Lun, 26 de Abr, 2004 12:54 pm
Asunto: RE: FW: Looking for people
emiliooca
Sin conexión Sin conexión
Enviar correo Enviar correo
 
Si, si, lo vi, interesante, pero...
Por lo pronto, ocupadisimo en mi tesis respuesta frecuente que ya le di a
mas de un amigo que me queria enganchar en algo. Pero ya falta menos.
En segundo lugar, yo no me calificaria como que really understando the
underpinnings of Squeak.
Y tercero, puedo hacer algun aporte en Tex (no text)(a cross platform type
solution) y nada en video.

Como siempre estoy dispuesto a escuchar, opinar, revisar, pero lo que se
dice trabajar, trabajar, por un tiempo me va a costar un poco.

Saludos

	 Emilio


> -----Mensaje original-----
> De: Lic. Edgar J. De Cleene [mailto:edgardec2001@...]
> Enviado el: Sábado, 24 de Abril de 2004 07:47
> Para: squeakRos@...
> Asunto: [squeakRos] FW: Looking for people
>
>
> German, Emilio, Mark, que opinan de mandar mail a esta gente.
> Para el resto, especialmente los nuevos, podría alguien
> comprometerse en ser
> tester?
>
> ------ Forwarded Message
> From: Steven Riggins <mailinglists@...>
> Reply-To: The general-purpose Squeak developers list
> <squeak-dev@...>
> Date: Fri, 23 Apr 2004 14:58:49 -0700
> To: The general-purpose Squeak developers list
> <squeak-dev@...>
> Subject: Looking for people
>
> Hi list!
>
> We're looking for a few great people to help us make TK4 a reality.
> TK4 will be a open source, cutting edge authoring tool allowing anyone
> and everyone to create interesting content that reads with high
> fidelity on several platforms.
>
> We looking for one full time person and two contractors.  If
> you are in
> the Pacific NorthWest (I am in Portland) that would be great.
>
> I need people who really understand the underpinnings of Squeak (I do
> not), who know text (We need a cross platform type solution),
> video (We
> need a cross platform video solution) and understand that this is a
> tool for people who do not use computers, ie, World Browser is not an
> object our customers will see :)
>
> This is a very exciting and ambitious product.  We can help
> make Squeak
> better for all, contribute to the community and give our customers
> powerful, extensible tools.
>
> Please send inquiries and resumés to:  geek@...
> Please put "TK4" somewhere in the subject.
>
> Sincerely,
>
> Steve
>
> ------ End of Forwarded Message
>
>
>
>
> correo electrónico a: squeakRos-unsubscribe@...
>
>
> correo electrónico a: squeakRos-unsubscribe@...
>
>
> Yahoo! Grupos Enlaces
>
> Para visitar tu grupo en Internet, vé a:
>  http://ar.groups.yahoo.com/group/squeakRos/
>
> Para cancelar tu suscripción a este grupo, enviá un mensaje a:
>  squeakRos-unsubscribe@...
>
> El uso de Yahoo! Grupos se rige por:
>  http://ar.docs.yahoo.com/info/utos.html
>

#480 De: German <gboccoleri@...>
Fecha: Lun, 26 de Abr, 2004 7:43 am
Asunto: Re: presentación
gboccoleri
Sin conexión Sin conexión
Enviar correo Enviar correo
 
Javier: Bienvenido.
Con un grupo de alumnos de FI-UBA en una materia, estamos usando VW
sobre Suse Linux y con otro grupo en un Instituto Terciario privado,
estamos usando exclusivamente ST/X tambien sobre Suse ( para las
teoricas y las practicas).
Cuando nos juntamos a intercambiar ideas y experiencias no nos
focalizamos tanto en uno u otro,
ya que el interes es mas bien formativo, y para eso cualquier Smalltalk
sirve. (los contraejemplos de VAST tambien ense#an).

Lo que si te puedo contar precisamente sobre ST/X es que lo venimos
usando sobre la ultima version de Suse
y no hemos tenido problemas. ( igual tenes que tener en cuenta que es un
ambiente en una
etapa de crecimiento temprana... mantenido con esfuerzo por muy poca
gente, Claus G. principalmente). Es decir
que algunos objetos que ya tenes en otros ambientes, aqui en ST/X aun no
los tenes ( por supuesto que podes
crearlos vos mismo....) y tambien pasa que encontras paquetes que te
sorprenden para bien.

Contanos: Ya estuviste viendo algo? Sobre Win o Linux?
y... por ultimo: por que ST/X ? ( aunque algo sospecho)

En breve nos volveremos a reunir presencialmente, lo que avisaremos por
esta lista.
Espero que puedas concurrir para contarnos tu experiencia.
Saludos

German.


javierorsaria wrote:

>Lista:
>
>
>
>Soy alumno de la UTN Rosario y estoy interesado en la T.O., particularmente en
Smalltalk/X. Quisiera saber si realizan reuniones en la facultad o en otro lado,
ya que no he visto ningún cartel como sí había el año pasado (a lo que no pude
asistir).
>
>
>
>Saludos,
>
>
>
>Javier.-
>
>
>
>

#479 De: "Lic. Edgar J. De Cleene" <edgardec2001@...>
Fecha: Sáb, 24 de Abr, 2004 10:04 pm
Asunto: Re: presentación
edgardec2001
Sin conexión Sin conexión
Enviar correo Enviar correo
 
On 24/04/04 13:26, "javierorsaria" <javierorsaria@...> wrote:

> Lista:
>
> Soy alumno de la UTN Rosario y estoy interesado en la T.O., particularmente en
> Smalltalk/X. Quisiera saber si realizan reuniones en la facultad o en otro
> lado, ya que no he visto ningún cartel como sí había el año pasado (a lo que
> no pude asistir).
>
> Saludos,
>
> Javier.-
Javier:
Podes llamar al 4264689 para coordinar.
El lunes a la mañana vamos, dependemos de que nos presten laboratorio.
Lo que hacemois (al menos yo) es Squeak.
Hay tutoriales en http://ar.geocities.com/edgardec2001/Welcome.html, la
mayoría en castellano.

Edgar

#478 De: "Lic. Edgar J. De Cleene" <edgardec2001@...>
Fecha: Sáb, 24 de Abr, 2004 10:46 am
Asunto: FW: Looking for people
edgardec2001
Sin conexión Sin conexión
Enviar correo Enviar correo
 
German, Emilio, Mark, que opinan de mandar mail a esta gente.
Para el resto, especialmente los nuevos, podría alguien comprometerse en ser
tester?

------ Forwarded Message
From: Steven Riggins <mailinglists@...>
Reply-To: The general-purpose Squeak developers list
<squeak-dev@...>
Date: Fri, 23 Apr 2004 14:58:49 -0700
To: The general-purpose Squeak developers list
<squeak-dev@...>
Subject: Looking for people

Hi list!

We're looking for a few great people to help us make TK4 a reality.
TK4 will be a open source, cutting edge authoring tool allowing anyone
and everyone to create interesting content that reads with high
fidelity on several platforms.

We looking for one full time person and two contractors.  If you are in
the Pacific NorthWest (I am in Portland) that would be great.

I need people who really understand the underpinnings of Squeak (I do
not), who know text (We need a cross platform type solution), video (We
need a cross platform video solution) and understand that this is a
tool for people who do not use computers, ie, World Browser is not an
object our customers will see :)

This is a very exciting and ambitious product.  We can help make Squeak
better for all, contribute to the community and give our customers
powerful, extensible tools.

Please send inquiries and resumés to:  geek@...
Please put "TK4" somewhere in the subject.

Sincerely,

Steve

------ End of Forwarded Message

#477 De: javierorsaria <javierorsaria@...>
Fecha: Sáb, 24 de Abr, 2004 4:26 pm
Asunto: presentación
javierorsaria
Sin conexión Sin conexión
Enviar correo Enviar correo
 
Lista:

Soy alumno de la UTN Rosario y estoy interesado en la T.O., particularmente en
Smalltalk/X. Quisiera saber si realizan reuniones en la facultad o en otro lado,
ya que no he visto ningún cartel como sí había el año pasado (a lo que no pude
asistir).

Saludos,

Javier.-

#476 De: "Lic. Edgar J. De Cleene" <edgardec2001@...>
Fecha: Vie, 23 de Abr, 2004 6:27 pm
Asunto: [TEG] Primer experimento de protocolo de red
edgardec2001
Sin conexión Sin conexión
Enviar correo Enviar correo
 
A todos los interesados, les cuento.
Esta mañana hicimos correr con Mauricio en la UTN el primer experimento para
el TEG en red.
Llevamos una imagen del SqueakLight cargada con el TEG y con los archvios
que adjunto.
Haciendo en la imagen que actua como server VNCServer start y en los
clientes RemoteClient new, pudimos ver que el "amillo' funcionó con los
siguientes errores.
Aparentemente el server contesta a todos los clientes, aunque si procesa el
"token" lógico de esperar comando de la máquina cliente que corresponde.
El supuesto es que con tantas pruebas y modificaciones , está faltando en el
RemoteExperiments.5.cs que el server mande a los clientes un 'WAIT' y que
estos continuen el lazo de espera hasta recibirlo, por eso adjunto el 4
también.
Voy a ver de solucionar esto el fin de semana, el lunes a las 9 conseguimos
que nos presten  laboratorio para hacer una nueva prueba en red.
Como cosa extraña, aquí con una Mac corriendo OS X t la otra OS 9.1'Ed' ,
eso no ocurrió, por lo que intentare el lunes llevar a "Voyager" y ponerla
en red bajo Windos 2000 Server (que es lo que hay alLá).
La idea es cuando ande , mandar un objeto que tenga el "estado" del juego y
ver si se lo banca con sendObject y sendObject que oportunamente le copie a
Diego.
También agregaré a la lista de autores copiados a Colin Putney que hizo el
VNCServer (que uso y modifico para transformarlo en TEGServer).
Cuando tenga algo mas depurado, voy a ver de contactarlo ya que se que algo
de castellano entiende.

Edgar
'From Squeak3.6 of ''6 October 2003'' [latest update: #5424] on 22 April 2004 at
10:09:58 am'! "Change Set:  RemoteExperiments Date: 	 3 April 2004 Author: 	 edc
This is a little toy for comand SqueakLight server from a regular image. Uses a
couple of methods by Diego Gomez Deck. lets send and receive objects and with
String complier in remote you can do nice tricks"!  Object subclass:
#RemoteClient  instanceVariableNames: 'socket serverName '  classVariableNames:
''  poolDictionaries: ''  category: 'RemoteExperiments'!  !RemoteClient
methodsFor: 'as yet unclassified' stamp: 'edc 4/22/2004 09:58'! initialize  |
command |  Transcript open.  Transcript show: 'starting remote comm test'; 		
cr.  Transcript show: 'initializing network ... '.  Socket initializeNetwork. 
Transcript show: 'ok'; 		 cr.  serverName _ 'localhost'.  command _ 'UNO'
asByteArray.  Transcript show: 'server start to perform instructions'; 		 cr.
self newSocket.  self nextCommand: command! !  !RemoteClient methodsFor: 'as yet
unclassified' stamp: 'edc 4/20/2004 11:54'! newCommand  ^ FillInTheBlank
request: 'Type remote image command' initialAnswer: ''.  ! !  !RemoteClient
methodsFor: 'as yet unclassified' stamp: 'edc 4/22/2004 08:03'! newSocket 
socket _ Socket newTCP.  socket 	 connectTo: (NetNameResolver addressForName:
serverName) 	 port: 8000.  socket waitForConnectionUntil: Socket
standardDeadline! !  !RemoteClient methodsFor: 'as yet unclassified' stamp: 'edc
4/22/2004 09:58'! nextCommand: aString 
 | objRec command |  command _ aString. 
[command = 'FIN'] 	 whileFalse: [ 		 (socket isValid 				 and: [socket
isConnected]) 			 ifTrue: [Transcript show: 'Command sended is ' , command;
cr. 				 socket sendData: command] 			 ifFalse: ["stale connection" 				 socket
destroy. 				 socket _ nil]. 		 [socket dataAvailable] whileFalse. 		 objRec _
socket getData. 		 Transcript show: 'Response is ' , objRec printString; 				
cr. 		 objRec = 'WAIT' 			 ifTrue: [[socket dataAvailable] whileFalse. 				
objRec _ socket getData. 				 self halt]. 		 command _ self newCommand]! ! 
!RemoteClient class methodsFor: 'as yet unclassified' stamp: 'edc 2/16/2004
09:53'! new super new initialize! ! 
 !Socket methodsFor: 'receiving' stamp:
'edc 2/15/2004 09:17'! getData  | t1 t2 |  (self waitForDataUntil: Socket
standardDeadline) 	 ifFalse: [self error: 'getData timeout'].  t1 _ String new:
4000.  t2 _ self 			 primSocket: socketHandle 			 receiveDataInto: t1 			
startingAt: 1 			 count: t1 size.  ^ t1 copyFrom: 1 to: t2! !  !Socket
methodsFor: 'waiting' stamp: 'jm 3/2/98 18:15'! waitForConnectionUntil: deadline
"Wait up until the given deadline for a connection to be established. Return
true if it is established by the deadline, false if not." 
 | status |  status _
self primSocketConnectionStatus: socketHandle.  [(status = WaitingForConnection)
and: [Time millisecondClockValue < deadline]] 	 whileTrue: [ 		 semaphore
waitTimeoutMSecs: (deadline - Time millisecondClockValue). 		 status _ self
primSocketConnectionStatus: socketHandle]. 
 ^ status = Connected! !  !Socket
methodsFor: 'waiting' stamp: 'edc 2/15/2004 09:19'! waitForDataUntil: deadline 
"Wait up until the given deadline for data to arrive. Return true if data 
arrives by the deadline, false if not."  | dataArrived |  [self isConnected &
(dataArrived := self primSocketReceiveDataAvailable: socketHandle) not 	 and:
["Connection end and final data can happen fast, so test in this 
		 order " 		
Time millisecondClockValue < deadline]] 	 whileTrue: [self readSemaphore
waitTimeoutMSecs: deadline - Time millisecondClockValue].  ^ dataArrived! ! 
!Socket methodsFor: 'sending-receiving objects' stamp: 'dgd 2/22/2002 20:28'!
getObject  "gets a serialized object from this socket"  | encoded object | 
encoded _ String new writeStream.  [encoded size isZero] 	 whileTrue: [encoded
nextPutAll: self getData].  [self isConnected 	 and: [self dataAvailable]] 	
whileTrue: [encoded nextPutAll: self getData].  object _ ReferenceStream
unStream: encoded contents.  ^ object! !  !Socket methodsFor: 'sending-receiving
objects' stamp: 'dgd 2/22/2002 20:28'! sendObject: anObject 
 "sends a
serialized object to this socket"  | encoded |  encoded _ ReferenceStream
streamedRepresentationOf: anObject.  self sendData: encoded! ! 
 !Socket class
methodsFor: 'remoteExamples' stamp: 'edc 2/15/2004 10:53'! remoteCommClient  |
newSocket objRec command serverName |  Transcript open.  Transcript show:
'starting remote comm test'; 		 cr.  Transcript show: 'initializing network ...
'.  Socket initializeNetwork.  Transcript show: 'ok'; 		 cr.  serverName :=
'169.254.6.4'.  command := FillInTheBlank request: 'Type remote image command'
initialAnswer: ''.  newSocket := Socket newTCP.  newSocket 	 connectTo:
(NetNameResolver addressForName: serverName) 	 port: 8000.  newSocket
waitForConnectionUntil: Socket standardDeadline.  Transcript show: 'server start
to perform instructions'; 		 cr.  [command = 'FIN'] 	 whileFalse: [Transcript
show: 'Command sended is ' , command; 				 cr. 		 newSocket sendObject: command.
newSocket 			 waitForConnectionUntil: (Socket deadlineSecs: 60). 		 [newSocket
isConnected] 			 whileTrue: [newSocket dataAvailable 					 ifTrue: [newSocket
dataAvailable 							 ifTrue: [objRec := newSocket getObject. 								
Transcript show: 'Resoonse is ' , objRec printString; 										 cr. 								
command := FillInTheBlank request: 'Type remote image command' initialAnswer:
'']]]].  newSocket closeAndDestroy! !
Object subclass: #TEGServer  instanceVariableNames: 'port process ear socketList
activeClient addClient '  classVariableNames: ''  poolDictionaries: '' 
category: 'Morphic-TEG'!  !TEGServer methodsFor: 'as yet unclassified' stamp:
'edc 4/22/2004 10:58'! addClient: socket 
	 | iPAddress |  iPAddress _
NetNameResolver stringFromAddress: socket remoteAddress.  Transcript show:
iPAddress; 		 tab.  Transcript show: socket getData; 		 cr.  activeClient _
activeClient + 1.  socketList 	 at: iPAddress 	 ifAbsent: [socketList at:
activeClient put: socket].  activeClient = 2 	 ifTrue: [self ringLoop]! ! 
!TEGServer methodsFor: 'as yet unclassified' stamp: 'edc 4/22/2004 11:09'!
newEar  | socket |  socket _ Socket 			 tcpCreateIfFail: [self error: 'Unable to
create a socket'].  socket listenOn: port backlogSize: 6.  ^ socket! ! 
!TEGServer methodsFor: 'as yet unclassified' stamp: 'cwp 9/29/2002 19:54'!
newProcess  | p |  p _ [self serviceLoop] newProcess.  p priority: self class
priority.  ^ p ! !  !TEGServer methodsFor: 'as yet unclassified' stamp: 'edc
4/15/2004 16:29'! nextClient self halt.! !  !TEGServer methodsFor: 'as yet
unclassified' stamp: 'cwp 9/29/2002 17:38'! port: aPort  port _ aPort! ! 
!TEGServer methodsFor: 'as yet unclassified' stamp: 'edc 4/22/2004 10:59'!
ringLoop  | socket objRec iPAddress |  [true] 	 whileTrue: [activeClient _
activeClient \\ 2 + 1. 		 socket _ socketList at: activeClient. 		 (socket
isValid 				 and: [socket isConnected]) 			 ifTrue: [socket sendData: 'OK'. 				
[socket dataAvailable] whileFalse. 				 objRec _ socket getData. 				 iPAddress
_ NetNameResolver stringFromAddress: socket remoteAddress. 				 Transcript show:
iPAddress; 						 tab. 				 Transcript show: objRec printString; 						 cr]]! ! 
!TEGServer methodsFor: 'as yet unclassified' stamp: 'edc 4/15/2004 16:28'!
serviceLoop  | conn |  conn _ nil.  ear _ self newEar.  [true] 	 whileTrue:
[[conn isNil] 			 whileTrue: [conn _ ear waitForAcceptUntil: Socket
standardDeadline]. 		 conn isConnected 			 ifTrue: [ addClient ifTrue:[ self
addClient: conn.] ifFalse:[ self nextClient]. 				 conn _ nil] 			 ifFalse:
[self error: 'Accepted unconnected socket']]! !  !TEGServer methodsFor: 'as yet
unclassified' stamp: 'edc 4/22/2004 10:56'! start  Transcript open. 	
socketList _ Dictionary new.  activeClient _ 0.  addClient _ true.  process 	
ifNil: [Socket initializeNetwork. 		 process _ self newProcess. 		 process
resume] 	 ifNotNil: [self error: 'TEG Server already started']! !  !TEGServer
methodsFor: 'as yet unclassified' stamp: 'edc 4/15/2004 15:58'! stop  process
terminate.  process _ nil.  ear closeAndDestroy.  ear _ nil. ! !  "-- -- -- --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- "!  TEGServer class 
instanceVariableNames: ''!  !TEGServer class methodsFor: 'defaults' stamp: 'edc
4/22/2004 10:52'! defaultPort  ^ 8000! !  !TEGServer class methodsFor:
'defaults' stamp: 'cwp 9/29/2002 19:54'! priority  ^ Processor lowIOPriority! ! 
!TEGServer class methodsFor: 'defaults' stamp: 'edc 4/20/2004 08:43'! start
Transcript open. Transcript show: 'TEGServer starting...';cr.  ^ self startOn:
self defaultPort! ! 
 !TEGServer class methodsFor: 'running' stamp: 'cwp
9/29/2002 17:37'! startOn: aPort  ^ self new port: aPort; start! !  !TEGServer
class methodsFor: 'running' stamp: 'cwp 11/3/2002 00:20'! stop  self
allInstancesDo: [:server | server stop]! !
'From Squeak3.6 of ''6 October 2003'' [latest update: #5424] on 20 April 2004 at
2:31:53 pm'! "Change Set:  RemoteExperiments Date: 	 3 April 2004 Author: 	 edc 
This is a little toy for comand SqueakLight server from a regular image. Uses a
couple of methods by Diego Gomez Deck. lets send and receive objects and with
String complier in remote you can do nice tricks"!  Object subclass:
#RemoteClient  instanceVariableNames: 'socket serverName '  classVariableNames:
''  poolDictionaries: ''  category: 'RemoteExperiments'!  !RemoteClient
methodsFor: 'as yet unclassified' stamp: 'edc 4/20/2004 14:22'! initialize  |
command |  Transcript open.  Transcript show: 'starting remote comm test'; 		
cr.  Transcript show: 'initializing network ... '.  Socket initializeNetwork. 
Transcript show: 'ok'; 		 cr.  serverName _ 'localhost'.  command _ 'UNO'
asByteArray. 	
 Transcript show: 'server start to perform instructions'; 		 cr. 
self nextCommand: command! !  !RemoteClient methodsFor: 'as yet unclassified'
stamp: 'edc 4/20/2004 11:54'! newCommand  ^ FillInTheBlank request: 'Type remote
image command' initialAnswer: ''.  ! !  !RemoteClient methodsFor: 'as yet
unclassified' stamp: 'edc 4/20/2004 11:45'! newSocket socket _ Socket newTCP. 
socket 	 connectTo: (NetNameResolver addressForName: serverName) 	 port: 5900. 
socket waitForConnectionUntil: Socket standardDeadline.! !  !RemoteClient
methodsFor: 'as yet unclassified' stamp: 'edc 4/20/2004 14:24'! nextCommand:
aString 
 | objRec command |  command _ aString.  [command = 'FIN'] 
	
whileFalse: [self newSocket. (socket isValid 				 and: [socket isConnected]) 			
ifTrue: [Transcript show: 'Command sended is ' , command; 						 cr. 				 socket
sendData: command] 			 ifFalse: ["stale connection" 				 socket destroy. 				
socket _ nil. 				 ]. 		 [socket dataAvailable] whileFalse. 		 objRec _ socket
getData. socket destroy. 				 socket _ nil. 		 objRec = 'WAIT' 			 ifTrue:
[[socket dataAvailable] whileFalse. 				 objRec _ socket getData]. 		 self halt.
Transcript show: 'Response is ' , objRec printString; 				 cr. 		 command _ self
newCommand]! ! 
 !RemoteClient class methodsFor: 'as yet unclassified' stamp:
'edc 2/16/2004 09:53'! new super new initialize! ! 
 !Socket methodsFor:
'receiving' stamp: 'edc 2/15/2004 09:17'! getData  | t1 t2 |  (self
waitForDataUntil: Socket standardDeadline) 	 ifFalse: [self error: 'getData
timeout'].  t1 _ String new: 4000.  t2 _ self 			 primSocket: socketHandle 			
receiveDataInto: t1 			 startingAt: 1 			 count: t1 size.  ^ t1 copyFrom: 1 to:
t2! !  !Socket methodsFor: 'waiting' stamp: 'jm 3/2/98 18:15'!
waitForConnectionUntil: deadline  "Wait up until the given deadline for a
connection to be established. Return true if it is established by the deadline,
false if not." 
 | status |  status _ self primSocketConnectionStatus:
socketHandle.  [(status = WaitingForConnection) and: [Time millisecondClockValue
< deadline]] 	 whileTrue: [ 		 semaphore waitTimeoutMSecs: (deadline - Time
millisecondClockValue). 		 status _ self primSocketConnectionStatus:
socketHandle]. 
 ^ status = Connected! !  !Socket methodsFor: 'waiting' stamp:
'edc 2/15/2004 09:19'! waitForDataUntil: deadline 
 "Wait up until the given
deadline for data to arrive. Return true if data 
 arrives by the deadline,
false if not."  | dataArrived |  [self isConnected & (dataArrived := self
primSocketReceiveDataAvailable: socketHandle) not 	 and: ["Connection end and
final data can happen fast, so test in this 
		 order " 		 Time
millisecondClockValue < deadline]] 	 whileTrue: [self readSemaphore
waitTimeoutMSecs: deadline - Time millisecondClockValue].  ^ dataArrived! ! 
!Socket methodsFor: 'sending-receiving objects' stamp: 'dgd 2/22/2002 20:28'!
getObject  "gets a serialized object from this socket"  | encoded object | 
encoded _ String new writeStream.  [encoded size isZero] 	 whileTrue: [encoded
nextPutAll: self getData].  [self isConnected 	 and: [self dataAvailable]] 	
whileTrue: [encoded nextPutAll: self getData].  object _ ReferenceStream
unStream: encoded contents.  ^ object! !  !Socket methodsFor: 'sending-receiving
objects' stamp: 'dgd 2/22/2002 20:28'! sendObject: anObject 
 "sends a
serialized object to this socket"  | encoded |  encoded _ ReferenceStream
streamedRepresentationOf: anObject.  self sendData: encoded! ! 
 !Socket class
methodsFor: 'remoteExamples' stamp: 'edc 2/15/2004 10:53'! remoteCommClient  |
newSocket objRec command serverName |  Transcript open.  Transcript show:
'starting remote comm test'; 		 cr.  Transcript show: 'initializing network ...
'.  Socket initializeNetwork.  Transcript show: 'ok'; 		 cr.  serverName :=
'169.254.6.4'.  command := FillInTheBlank request: 'Type remote image command'
initialAnswer: ''.  newSocket := Socket newTCP.  newSocket 	 connectTo:
(NetNameResolver addressForName: serverName) 	 port: 8000.  newSocket
waitForConnectionUntil: Socket standardDeadline.  Transcript show: 'server start
to perform instructions'; 		 cr.  [command = 'FIN'] 	 whileFalse: [Transcript
show: 'Command sended is ' , command; 				 cr. 		 newSocket sendObject: command.
newSocket 			 waitForConnectionUntil: (Socket deadlineSecs: 60). 		 [newSocket
isConnected] 			 whileTrue: [newSocket dataAvailable 					 ifTrue: [newSocket
dataAvailable 							 ifTrue: [objRec := newSocket getObject. 								
Transcript show: 'Resoonse is ' , objRec printString; 										 cr. 								
command := FillInTheBlank request: 'Type remote image command' initialAnswer:
'']]]].  newSocket closeAndDestroy! !

#475 De: el_mauri@...
Fecha: Vie, 23 de Abr, 2004 4:24 pm
Asunto: RE: Hola Rosario
el_mauri_yo
Sin conexión Sin conexión
Enviar correo Enviar correo
 
Hola me llamo Mauricio y soy de rosario (alumno de Edgar), tengo 21 año
y estoy interesado en aprender, y segun cuenta Edgar, eso, junto con ganas
y tiempo es suficiente para aprender Squeak que es algo muy importante.
Todavia no estoy del todo empapado con el Squeak y sus cosas, pero dispuesto
a aprender, sobretodo si hay ejemplos y esas cosas.
desde ya muchas gracias a todos.

besos Mauri.
>-- Mensaje Original --
>To: squeakRos@...
>From: "markhcsisi" <markhc@...>
>Date: Thu, 22 Apr 2004 12:24:13 -0000
>Subject: [squeakRos] Hola Rosario
>Reply-To: squeakRos@...
>
>
><html><body>
>
>
><tt>
>Hola Smalltalkers de Rosario<BR>
><BR>
>Me llamo Mark Hume-Cook, y soy Australiano.  Hace unas semanas fue a<BR>
>Argentina por vacaciones, y tuve la oportunidad a visitar con Edgar de<BR>
>Cleene en Rosario.  Piense que cuando viajo media de la tierra, tengo<BR>
>que encontrar unos Smalltalkers donde puedo.<BR>
><BR>
>Fue un visit muy agradable.  Que pena que estuve un poco enfermo, pero<BR>
>Edgar era un gran anfitrión ... la cerveza era fria y habia carne para<BR>
>comer, como me gusta.<BR>
><BR>
>Hablabamos mucho sobre Smalltalk, y las cosas de technologica en<BR>
>Argentina y en Australia.  Edgar preguntó si podría quedar un rato y<BR>
>venir encontrar a algunos estudiantes, pero tuve que estar en Buenos<BR>
>Aires el dia siguiente.  Bueno, la proxima vez, quiza puedo quedar un<BR>
>poco mas y encontrar mas Smalltalkers en Rosario.<BR>
><BR>
>Mi trabajo en Australia es con Visual Works Smalltalk, y construyo<BR>
>software por un banco de inversiones (Macquarie Bank, an Australian<BR>
>investment bank).  En este momento trabajo con Foreign Exchange con<BR>
>los japoneses, y un poco con los suizos.  Tenemos 20 Smalltalkers, mas<BR>
>o menos, y quiza podemos compartir ideas y pensamientos de vez en<BR>
>cuando.  (Pero, no hay muchos Australianos quien hable espanol muy<BR>
>bien... generalmente es peor que eso).  Y, por favor, si hay un<BR>
>Smalltalker Argentino en Australia, dígame, porque tengo que estar<BR>
>anfitrión, y hacer equilibrio en el mundo.<BR>
><BR>
>Ciao<BR>
><BR>
>Mark<BR>
><BR>
></tt>
>
><br><br>
><tt>
><BR>
>correo electrónico a: squeakRos-unsubscribe@...<BR>
><BR>
><BR>
>correo electrónico a: squeakRos-unsubscribe@...<BR>
><BR>
></tt>
><br><br>
>
>
>
><!-- |**|begin egp html banner|**| -->
>
><br>
><tt><hr width="500">
><b>Yahoo! Grupos Enlaces</b><br>
><ul>
><li>Para visitar tu grupo en Internet, vé a:<br><a
href="http://ar.groups.yahoo.com/group/squeakRos/">http://ar.groups.yahoo.com/gr\
oup/squeakRos/</a><br> 
><li>Para cancelar tu suscripción a este grupo, enviá un mensaje a:<br><a
href="mailto:squeakRos-unsubscribe@...?subject=Unsubscribe">squea\
kRos-unsubscribe@...</a><br> 
><li>El uso de Yahoo! Grupos se rige por las <a
href="http://ar.docs.yahoo.com/info/utos.html">Condiciones
del servicio de Yahoo!</a>.
></ul>
></tt>
></br>
>
><!-- |**|end egp html banner|**| -->
>
>
></body></html>
>


--------
E-mail y acceso a Internet UltraVeloz totalmente GRATIS en Buenos Aires,
Rosario, Cordoba, Mendoza, La Plata y Pilar
http://www.Argentina.com
Nro. de acceso 5078-5000 Usuario: Argentina Password: Argentina

#474 De: "Lic. Edgar J. De Cleene" <edgardec2001@...>
Fecha: Vie, 23 de Abr, 2004 10:56 am
Asunto: FW: [objetos] El "Nobel de la computación" es para Alan Kay ... :-D
edgardec2001
Sin conexión Sin conexión
Enviar correo Enviar correo
 

------ Forwarded Message
From: Hernán Galante <galanteh@...>
Reply-To: smalltalking@...
Date: Wed, 21 Apr 2004 14:06:25 -0300
To: <smalltalking@...>
Cc: <small_land@yahoogroups.com>
Subject: [objetos] El "Nobel de la computación" es para Alan Kay ... :-D

El premio Turing es para Alan Kay

     Traducido de http://www.squeakland.org/images/news/html/turing03.htm
      por Hernán Galante (galanteh@...)

 

       Nueva York, 19 de abril de 2004 – La Association for Computing Machinery (ACM) ha nombrado a Alan Kay el ganador del premio Turing 2003, considerado el “Premio Nobel de la computación", por liderar el equipo que inventó Smalltalk, un influyente lenguaje de programación que usa conceptos orientados a objetos, y por sus fundamentales contribuciones a la computación personal.

            Smalltalk, el primer lenguaje dinámico orientado a objetos completo, incluyó un ambiente revolucionario de que es actualmente es más común en las aplicaciones de computación. El Dr. Kay, un “Senior Fellow” en  Hewlett Packard Labs desde el 2002, es Presidente del Viewpoints Research Institute, el cual fundó en el 2001. El premio Turing implica un premio de $100,000, con fondos provistos por la corporación Intel.

            Este ha sido un año de premios para el Dr. Kay quien comparte este año el premio Charles Stark Draper, considerado el "Premio Nobel de ingeniería".

            Smalltalk unifica objetos y mensajes usando conceptos bases claros y simples que representan un gran adelanto en el diseño y la implementación en los lenguajes y metáforas de la programación. Estas ideas han influenciado el diseño de subsecuentes lenguajes orientados a objetos como C++ y Java.

            El profundo interés del Dr. Kay en los chicos y la educación lo han llevado a usar Smalltalk como un temprano vehículo para enseñar conceptos de computación en los primeros niveles de la escuela. En Xerox Palo Alto Research Center (PARC), el usó el descubrimiento de la psicología cognitiva que mostró que los chicos aprenden mejor si toquetean imágenes y símbolos en combinación con texto plano.

            El profesor Gary Chapman, director del 21st Century Project en la LBJ School of Public Affairs de la Universidad de Texas en Austin, lideró el comité de los premios Turing 2003. El expresó que el Dr. Kay imaginó a Smalltalk como parte de un acercamiento a la computación focalizado en el usuario, el cual permitió el desarrollo de componentes básicos como la interfaz de usuario y la ventanas solapas. El destacó que el equipo del Dr. Kay integró estas ideas en el primer computador personal, la Xerox Alto. “El concepto del Dr. Kay de la ‘Dynabook’, un simple computador del tamaño de un libro el cual la gente pudiera usar en lugar de papel, inspiró a una generación de científicos informáticos e ingenieros. Trazó las bases intelectuales para la revolución de la computación personal, desde el elegante estilo de Apple Macintosh hasta la orientación gráfica de Microsoft Windows” dijo Chapman.

            Graduado de la universidad de Utah, Dr. Kay se ganó un doctorado con distinción por el diseño de una computadora personal gráfica orientada a objetos, y un master en ingeniería electrónica. El Dr. Kay era miembro del equipo de investigación de la universidad que desarrolló uno de los pioneros trabajos gráficos 3-D para el Advanced Research Projects Agency (ARPA). El tamibén hizo carreras de matemáticas y biología en la universidad de Colorado de los cuales no se recibió. También ha sido “Chief Scientist” de Atari, un  “Fellow” de Apple, y Vice Presidente de "Research and Development" en Walt Disney. El Dr. Kay es un consultor del grupo de editores de la ACM Computers in Entertainment, la revista online que cubre el campo teórico y práctico de las aplicaciones computacionales aplicadas al entretenimiento.

            El Dr. Kay fue uno de los cuatro ingenieros premiados con el premio Draper de la academia nacional de ingeniería en mayo del 2004 por el desarrollo de la “Xerox Alto”. El fue introducido en el hall de de la fama de la “Utah Information Technology Association” en Noviembre del 2003. Su equipo desarrollador de Smalltalk recibió el premio ACM Software System en 1987. Es miembro de la “American Academy of Arts and Sciences”, de la “National Academy of Engineering”, de la “Royal Society of Arts”, y de la “Computer Museum History Center”. Es un guitarrista de Jazz, compositor y escritor de obras de teatro, y pianista amateur de los clásicos órganos de tuba.

Más referencias



Ø      http://www.acm.org/awards/taward.html

Ø      http://www.squeakland.org/images/news/html/draperprz.htm

 


Para retirarse del grupo,
puede enviar un email a:
smalltalking-unsubscribe@egroups.com




Yahoo! Grupos Enlaces
  • Para visitar tu grupo en Internet, vé a:
  • http://ar.groups.yahoo.com/group/smalltalking/
  • Para cancelar tu suscripción a este grupo, enviá un mensaje a:
  • smalltalking-unsubscribe@... <mailto:smalltalking-unsubscribe@...?subject=Unsubscribe>
  • El uso de Yahoo! Grupos se rige por las Condiciones del servicio de Yahoo! <http://ar.docs.yahoo.com/info/utos.html> .


------ End of Forwarded Message

#473 De: "Lic. Edgar J. De Cleene" <edgardec2001@...>
Fecha: Vie, 23 de Abr, 2004 10:52 am
Asunto: Re: Cerrar una imagen para entregar al usuario final
edgardec2001
Sin conexión Sin conexión
Enviar correo Enviar correo
 
>Te parece? Ya está en Beta y estoy casi todos los días en el IRC y siguiendo
>la lista, me parece que no está tan verde, es decir, está cerca de salir
>como oficial.

Si y ya leí todos los planes para el 3.8/4.0 y la movida de Hp para juntar
de nuevo al grupo original.
Igual no lo usaría para darle al usuario.

>Boris fue el que me contestó por el abandondSources, pidiendo el log, que le
>mandé y no volvió a dar señales de vida.

>La página a la que te referís es la del minnow (la del majorShrink)?

Hoy le explico la primera fase de obtener una imagen MVC limpia al chico que
viene, voy a tratar de armar un documentito y copiar lo que tiene Boris,
ampliandolo con algunas cosas que el no tiene , en el fin de semana lo pongo
en los tutoriales en castellano y subo el código al sitio.
Esto para 3.6

Para imagenes realmente chicas, seguiré con el SqueakLight , que a estas
alguras en la lista definirían como fork.
Es básicamente 3.4 con algunas cositas que le fui metiendo.
Estamos armando el TEG para funcionar en red, cuando lo hayamos probado en
la UTN (veremos si hoy tenemos laboratorio), haré una nueva demo TEG.imgae y
la pondré en el sitio (sacaré  la del LogicCircus)

>Me da la sensación que el proyecto Squat está un poco parado/abdandonado?
No me parece, mi problema es que no corre en mac por ahora.
Te recuerdo que mi conocimiento del C y del Unix es malo para lo que
necesito.
Si tuviera plata le pagaría a alguien para que me cuente como hacer una
"Aplcacion consola SIOUX típica' en C elemental y que corra en Mac OS X.
Me preguntaras para que.
Ya  tengo a medio descular como hacer un Smalltalk desde cero, tomando las
ideas de Ale Reimondo (que por lo que entendí no difieren mucho de las de
Latta) y usando como punto de partida los fuentes del LittleSmalltalk, que
tengo corriendo y tambien un constructor simbólico implementado en Squeak.
Demasiados proyectos...

>Mirá, esto no es fácil hoy en día, yo vivo de otra cosa, no de lo que hago
>en Squeak, pero ahora estoy justamente haciendo un producto en Squeak,
>aunque no es para un cliente que me lo haya encargado, sino para ofrecerlo
>por la web como shareware, un intento más como quién diría.


Uno mas. Lo tendríamos que convencer a Mark para que nos consiga clientes en
Australia.
A ellos les saldría baratísimo y nosotros tendriamos como vivir del
Smallalk.

Edgar

#472 De: "Lic. Edgar J. De Cleene" <edgardec2001@...>
Fecha: Vie, 23 de Abr, 2004 10:38 am
Asunto: Re: Hola Rosario
edgardec2001
Sin conexión Sin conexión
Enviar correo Enviar correo
 
Mark:
Gracias por tu mail.
Espero que lo lean los alumnos de la UAI y la UTN y te respondan.
Se que tambien tenemos algunos miembros en España, gracias al esfuerzo de
Diego.
Y algunos mas en otros lados.
Aquí vamos muy lento con el grupo, hoy espero al primero de la "tanda 2004".
Ya que te encanta el Smalltalk, en algún momento libre proba Squeak , aunque
sea para jugar un poco y no siempre hacer "cosas serias:
Si armas un SqueakSydney, prometo contestar y escribir en inglés.
Un abrazo.

Edgar

#471 De: "markhcsisi" <markhc@...>
Fecha: Jue, 22 de Abr, 2004 12:24 pm
Asunto: Hola Rosario
markhcsisi
Sin conexión Sin conexión
Enviar correo Enviar correo
 
Hola Smalltalkers de Rosario

Me llamo Mark Hume-Cook, y soy Australiano.  Hace unas semanas fue a
Argentina por vacaciones, y tuve la oportunidad a visitar con Edgar de
Cleene en Rosario.  Piense que cuando viajo media de la tierra, tengo
que encontrar unos Smalltalkers donde puedo.

Fue un visit muy agradable.  Que pena que estuve un poco enfermo, pero
Edgar era un gran anfitrión ... la cerveza era fria y habia carne para
comer, como me gusta.

Hablabamos mucho sobre Smalltalk, y las cosas de technologica en
Argentina y en Australia.  Edgar preguntó si podría quedar un rato y
venir encontrar a algunos estudiantes, pero tuve que estar en Buenos
Aires el dia siguiente.  Bueno, la proxima vez, quiza puedo quedar un
poco mas y encontrar mas Smalltalkers en Rosario.

Mi trabajo en Australia es con Visual Works Smalltalk, y construyo
software por un banco de inversiones (Macquarie Bank, an Australian
investment bank).  En este momento trabajo con Foreign Exchange con
los japoneses, y un poco con los suizos.  Tenemos 20 Smalltalkers, mas
o menos, y quiza podemos compartir ideas y pensamientos de vez en
cuando.  (Pero, no hay muchos Australianos quien hable espanol muy
bien... generalmente es peor que eso).  Y, por favor, si hay un
Smalltalker Argentino en Australia, dígame, porque tengo que estar
anfitrión, y hacer equilibrio en el mundo.

Ciao

Mark

#470 De: "Germán S. Arduino" <gsa@...>
Fecha: Jue, 22 de Abr, 2004 11:44 am
Asunto: Re: Cerrar una imagen para entregar al usuario final
garduino
Sin conexión Sin conexión
Enviar correo Enviar correo
 
> El 3.7 está reverde y no te aconsejo trabajar con eso para un cliente
final,

Te parece? Ya está en Beta y estoy casi todos los días en el IRC y siguiendo
la lista, me parece que no está tan verde, es decir, está cerca de salir
como oficial.

> El majorShrink  de Boris Gaertner <Boris.Gaertner@...> tiene una
página
> web.

Boris fue el que me contestó por el abandondSources, pidiendo el log, que le
mandé y no volvió a dar señales de vida.

La página a la que te referís es la del minnow (la del majorShrink)?

> Como está ahí tiene algunos problemas, puedo mandarte uno depurado.
> De todas maneras, te dará una imagen MVC a la que tendrás que arreglar a
tu
> gusto.

> Te cuento que el ripeado le saca cosas que después necesitas.
> Yo he armado todo tipo de cosas interesantes usando un
> Squeak3.6-5424MVC.image , que oferte a la lista poner en algún lado y
correr
> remoto (tengo todo desarrollado y funcionando)

> Lo que no logro es algo al estilo de la imagen reducida del SqueakLight,
de
> alrededor de entre 4 y 5 Mb final con Morphic.

Exactamente esto último es en lo que estoy interesado y a lo que apunto. Más
que nada, como prioridad uno, quiero llegar a un tamaño adecuado para que se
pueda descargar por cualquier conexión.

> Mandé a preguntar el tema de las dependencias para Morph, pero o no me
> entendieron o no lo saben.

Yo hice unas cuántas pruebas, pero siempre algo deja de andar, se ve que
saco algunas cosas que no se deben sacar :(

> Habrá que esperar que Craig Latta progrese con squaq (que no pude probar
por
> no haber version Mac todavía).

Me da la sensación que el proyecto Squat está un poco parado/abdandonado?

> Si sabes de cualquier laburo por money te lo agradecería.
> Tu homónimo Germán Boccoleri me viene prometiendo pero no concreta.

Mirá, esto no es fácil hoy en día, yo vivo de otra cosa, no de lo que hago
en Squeak, pero ahora estoy justamente haciendo un producto en Squeak,
aunque no es para un cliente que me lo haya encargado, sino para ofrecerlo
por la web como shareware, un intento más como quién diría.

> Abrazo y como siempre, por el pasaje ida y vuelta, el choripán y la coca,
> voy a culquier lado con my "Dynabook"

> Edgar

Saludos.

Germán Arduino.

#469 De: "Lic. Edgar J. De Cleene" <edgardec2001@...>
Fecha: Jue, 22 de Abr, 2004 10:43 am
Asunto: Re: Cerrar una imagen para entregar al usuario final
edgardec2001
Sin conexión Sin conexión
Enviar correo Enviar correo
 
On 21/04/04 18:58, "German Arduino" <gsa@...> wrote:

> Hola a todos:
>
> Edgar, te menciono puntualmente porque recuerdo que la imagen de
> LogicCircus estaba "shrinkeada" y cerrada, lista para entregar a un
> usuario de la aplicación.
>
> Con 3.7 #5878 estoy teniendo problemas para ambas cosas, puedo
> llegar a achicar la imagen muuuuy artesanalmente ya que el
> majorShrink nativo sigue sin funcionar y otras cosas como el
> abandonSources tampoco funcionan.
>
> Posteé el log del problema (del abandonSources) hace unos días
> en
> squeak-dev pero no he tenido respuestas.
>
> Cualquier consejo que me puedas dar en este sentido (ahicar y cerrar
> la imagen), así como si tenés algo para apuntarme para
> revisar/leer/estudiar, te lo voy a agradecer.
>
> Saludos.
>
> ---
> Germán S. Arduino
> ArSol Software
> http://www.arsol.net
> http://www.arsol.biz
>
>
>
>
>
> correo electrónico a: squeakRos-unsubscribe@...
>
>
> correo electrónico a: squeakRos-unsubscribe@...
>
>
> Yahoo! Grupos Enlaces
>
> Para visitar tu grupo en Internet, vé a:
> http://ar.groups.yahoo.com/group/squeakRos/
>
> Para cancelar tu suscripción a este grupo, enviá un mensaje a:
> squeakRos-unsubscribe@...
>
> El uso de Yahoo! Grupos se rige por:
> http://ar.docs.yahoo.com/info/utos.html
El 3.7 está reverde y no te aconsejo trabajar con eso para un cliente final,
El majorShrink  de Boris Gaertner <Boris.Gaertner@...> tiene una página
web.
Como está ahí tiene algunos problemas, puedo mandarte uno depurado.
De todas maneras, te dará una imagen MVC a la que tendrás que arreglar a tu
gusto.
Te cuento que el ripeado le saca cosas que después necesitas.
Yo he armado todo tipo de cosas interesantes usando un
Squeak3.6-5424MVC.image , que oferte a la lista poner en algún lado y correr
remoto (tengo todo desarrollado y funcionando)
Lo que no logro es algo al estilo de la imagen reducida del SqueakLight, de
alrededor de entre 4 y 5 Mb final con Morphic.
Mandé a preguntar el tema de las dependencias para Morph, pero o no me
entendieron o no lo saben.
Habrá que esperar que Craig Latta progrese con squaq (que no pude probar por
no haber version Mac todavía).
Si sabes de cualquier laburo por money te lo agradecería.
Tu homónimo Germán Boccoleri me viene prometiendo pero no concreta.

Abrazo y como siempre, por el pasaje ida y vuelta, el choripán y la coca,
voy a culquier lado con my "Dynabook"

Edgar

#468 De: "German Arduino" <gsa@...>
Fecha: Mié, 21 de Abr, 2004 9:58 pm
Asunto: Cerrar una imagen para entregar al usuario final
garduino
Sin conexión Sin conexión
Enviar correo Enviar correo
 
Hola a todos:

Edgar, te menciono puntualmente porque recuerdo que la imagen de
LogicCircus estaba "shrinkeada" y cerrada, lista para entregar a un
usuario de la aplicación.

Con 3.7 #5878 estoy teniendo problemas para ambas cosas, puedo
llegar a achicar la imagen muuuuy artesanalmente ya que el
majorShrink nativo sigue sin funcionar y otras cosas como el
abandonSources tampoco funcionan.

Posteé el log del problema (del abandonSources) hace unos días
en
squeak-dev pero no he tenido respuestas.

Cualquier consejo que me puedas dar en este sentido (ahicar y cerrar
la imagen), así como si tenés algo para apuntarme para
revisar/leer/estudiar, te lo voy a agradecer.

Saludos.

---
Germán S. Arduino
ArSol Software
http://www.arsol.net
http://www.arsol.biz

#467 De: "Lic. Edgar J. De Cleene" <edgardec2001@...>
Fecha: Lun, 19 de Abr, 2004 10:01 pm
Asunto: Re: INSCRIPCIÓN
edgardec2001
Sin conexión Sin conexión
Enviar correo Enviar correo
 
Hernán:
Bienenido:
Que versión de Squaak estás usando.
Te sirvieron los tutoriales ?
edgar

#466 De: hernan c <latachera@...>
Fecha: Lun, 19 de Abr, 2004 4:11 pm
Asunto: INSCRIPCIÓN
latachera
Sin conexión Sin conexión
Enviar correo Enviar correo
 
Desearía incribirme al grupo.
 
          Muchas gracias



¿Buscás un auto?
Encontralo en Yahoo! Autos
¡Más de 4000 clasificados todos los días!
Usados - 0 km - Vendé el tuyo

#465 De: "Lic. Edgar J. De Cleene" <edgardec2001@...>
Fecha: Jue, 1 de Abr, 2004 10:33 pm
Asunto: Re: [ANN] RMT (Remote Messaging Toolkit)
edgardec2001
Sin conexión Sin conexión
Enviar correo Enviar correo
 
On 01/04/04 08:25, "Masashi Umezawa" <umejava@...> wrote:

> Hello,
>
>> I wish to know if it's the same of a few days ago in
>>
>> ftp://swikis.ddo.jp/RMT/RMT.sar.
>
> I've put the file twice. The first was actually for testing.
> So, I recommend you get the file once again.
>
>> I also wish to know if possible load your package in Squeak 3.6 and if could
>> run with only KomServices or better loading all KomHttpServer-6.2.sar
>
> It is possible to load in 3.6. But connection pooling stuff does not run
> in 3.6, because #new does not send #initialize in 3.6.
> I've attached a patch for that. But there are some Socket related fixes
> between 3.6 and 3.7. So, it would be better in 3.7.
>
> RMT does not require KomHttpServer. It only uses KomServices.
>
>> Also , I doing network teaching this semester and try to do all Squeak as
>> possible, from  doing ppt like preentations, asking students to build single
>> XON/XOFF serial message protocol to using different web services (Comanche ,
>> HttpView, Seaside, etc).
>>
>
> RMT can be used for developing applicational protocols.
> For classroom lessons, 'developing your own ORB/VNC/CVS' would be interesting.
>
> I'll use RMT as a communication core of the incoming NetMorph,
> and 'Squeak native'(not SOAP) version of OperaORB.
>
> Cheers,
> ---
> [:masashi | ^umezawa]

#464 De: "Lic. Edgar J. De Cleene" <edgardec2001@...>
Fecha: Jue, 11 de Mar, 2004 11:32 pm
Asunto: Re: Novedades
edgardec2001
Sin conexión Sin conexión
Enviar correo Enviar correo
 
> La verdad es que adube de formateo estudio y  dedicado a otra cosa que me
> apasiona asi que el squek no lo toque , cuando empieze de nuevo empiezo a
> "hicharte"
> Saludos
> Pablo M. Mana
Ok.
Ayer tuve mi primer clase de redes y como siempre hice mi "propaganda"
Parece que hay algunos interesados, así que espero hacer algo y ponerlo en
Internet.
Hay un help superbueno en
http://www.xs4all.nl/~maartens/computing/squeak/SqueakHelp02.zip
Edgar

#463 De: "Pablo M. Mana" <satv@...>
Fecha: Jue, 11 de Mar, 2004 1:27 am
Asunto: Re: Novedades
satv@...
Enviar correo Enviar correo
 
La verdad es que adube de formateo estudio y  dedicado a otra cosa que me
apasiona asi que el squek no lo toque , cuando empieze de nuevo empiezo a
"hicharte"
Saludos
Pablo M. Mana

> >
> > Vamos a ver si este año logro que te aparezcas por aca
> > Saludos
> > Pablo
> Hola Pablo !!
> Ojalá, así nos conocemos.
> Estuviste haciendo algo ?
> Pregunta las dudas, no te quedes con ellas.
>
> Abrazo.
>
> Edgar
>
>
>
>
> correo electrónico a: squeakRos-unsubscribe@...
>
>
> correo electrónico a: squeakRos-unsubscribe@...
>
>
> Yahoo! Grupos Enlaces
>
> Para visitar tu grupo en Internet, vé a:
>  http://ar.groups.yahoo.com/group/squeakRos/
>
> Para cancelar tu suscripción a este grupo, enviá un mensaje a:
>  squeakRos-unsubscribe@...
>
> El uso de Yahoo! Grupos se rige por:
>  http://ar.docs.yahoo.com/info/utos.html
>

#462 De: "Lic. Edgar J. De Cleene" <edgardec2001@...>
Fecha: Lun, 1 de Mar, 2004 10:40 pm
Asunto: Re: Novedades
edgardec2001
Sin conexión Sin conexión
Enviar correo Enviar correo
 
>
> Vamos a ver si este año logro que te aparezcas por aca
> Saludos
> Pablo
Hola Pablo !!
Ojalá, así nos conocemos.
Estuviste haciendo algo ?
Pregunta las dudas, no te quedes con ellas.

Abrazo.

Edgar

#461 De: "Pablo M. Mana" <satv@...>
Fecha: Lun, 1 de Mar, 2004 8:05 pm
Asunto: Re: Novedades
satv@...
Enviar correo Enviar correo
 
Vamos a ver si este año logro que te aparezcas por aca
Saludos
Pablo
> Mientras tanto, sigan firmes con el Squeak, y si alguno quiere cursos o
> charlas ya saben, por la coca y el pancho voy.
>
> Edgar
>
>
> ------ Fin del mensaje reenviado
>
>
>
>
> correo electrónico a: squeakRos-unsubscribe@...
>
>
> correo electrónico a: squeakRos-unsubscribe@...
>
>
> Yahoo! Grupos Enlaces
>
> Para visitar tu grupo en Internet, vé a:
>  http://ar.groups.yahoo.com/group/squeakRos/
>
> Para cancelar tu suscripción a este grupo, enviá un mensaje a:
>  squeakRos-unsubscribe@...
>
> El uso de Yahoo! Grupos se rige por:
>  http://ar.docs.yahoo.com/info/utos.html
>

#460 De: "Lic. Edgar J. De Cleene" <edgardec2001@...>
Fecha: Jue, 19 de Feb, 2004 8:24 pm
Asunto: Re: Primeros Inconvenientes
edgardec2001
Sin conexión Sin conexión
Enviar correo Enviar correo
 
On 19/02/04 15:36, "Francisco F. Artese" <lw3drq@...> wrote:

>
> Hola Grupo:
>
> Debido a mi desconocimiento todavía del uso adecuado del browser cuando meto
> la pata en algo la imagen de squeak se estropea y nada funciona
> correctamente al intentar desplegar los menus del mundo me sale cualquier
> cosa y no me queda otra que armar una imagen nueva perdiendo todo lo que
> estuve haciendo.
>
> Es normal esto o mi squeak tiene algo mal ??
>
> Saludos
Hace rato que no tengo problemas y hago muchas herejías.
Por cierto , aunque se culque el Squeak (no tengo experiencia en Linux pero
en Mac y PC no lo he visto colgarse en mucho tiempo), todo te queda en los
.changes , si es que hiciste cambios.
Me encantaría saber la secuencia exacta del cuelgue o sino mandame el
archivo SqueakDebug.log, que seguro te aparecerá en el mismo directorio
donde tenés el Squeak.
Te recomindo poner todo en el mismo directorio, para evitar problemas.

Edgar

#459 De: "Francisco F. Artese" <lw3drq@...>
Fecha: Jue, 19 de Feb, 2004 6:36 pm
Asunto: Primeros Inconvenientes
lw3drq
Sin conexión Sin conexión
Enviar correo Enviar correo
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hola Grupo:

Debido a mi desconocimiento todavía del uso adecuado del browser cuando meto
la pata en algo la imagen de squeak se estropea y nada funciona
correctamente al intentar desplegar los menus del mundo me sale cualquier
cosa y no me queda otra que armar una imagen nueva perdiendo todo lo que
estuve haciendo.

Es normal esto o mi squeak tiene algo mal ??

Saludos

- --
  La ley es una telaraña grande, pero que atrapa al bicho chico.
==============================================================
Francisco F. Artese  -  Linux user #174223   -   ICQ #17693614
Linux Mandrake 9.1 + IceWM 1.2.13 + ASUS A7V8X + ATHLON XP
Clave Pública http://www.rediris.es - Buenos Aires - Argentina
==============================================================
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFANQJBq0XEodxw2lkRAgULAJ9IeZqCnZyuXy9/dgXCkUwIQq0edgCg1HnG
OPjTOVsAifRYU7wI2SLaylk=
=3VJ6
-----END PGP SIGNATURE-----

#458 De: "Francisco F. Artese" <lw3drq@...>
Fecha: Jue, 19 de Feb, 2004 3:53 pm
Asunto: Me presento al grupo
lw3drq
Sin conexión Sin conexión
Enviar correo Enviar correo
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hola smalltalkeros rosarinos !!

Mi nombre es Francisco F. Artese y me presento al grupo con mis  mas
respetuosos saludos ( aclaro que respeto personas pero no ideas ;-) ).

Soy novato en esto de POO pero me llamó mucho la atención esto del Smalltalk
y por eso me decidí a incursionar en el.

Me gustó mucho la página del Lic. Edgar J. De Cleene asi que le hice un
wget y la tengo en mi Linux para estudiarla.

Bueno no vemos y espero que no me echen por mis preguntontas o por algún
comentario que pueda caer mal.

Saludos

- --
  Scan report: Windows found. Remove it? (Y/Y)
==============================================================
Francisco F. Artese  -  Linux user #174223   -   ICQ #17693614
Linux Mandrake 9.1 + IceWM 1.2.13 + ASUS A7V8X + ATHLON XP
Clave Pública http://www.rediris.es - Buenos Aires - Argentina
==============================================================
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFANNwJq0XEodxw2lkRApn1AKCu6tjiYvjyjIfYF8UQtHPkEgGDXACgmxHD
sq1cs8CAnYedH2pw01Bt9nY=
=isi1
-----END PGP SIGNATURE-----

#457 De: Mario Marcelino Garcia <mmgarcia@...>
Fecha: Mié, 18 de Feb, 2004 2:59 pm
Asunto: Re: Novedades
mmgarcia@...
Enviar correo Enviar correo
 
Bueno voy a comentar a los chicos
Saludos
Mario

On Wed, 18 Feb 2004, Lic. Edgar J. De Cleene wrote:

> > Hola Edgar
> > Soy mario el estudiante de la UTN que tiempo atras habiamos arrancado con
> > squeak . La ultima vez que nos encontramos le comente que  tenia intenciones
> > de proseguir con el grupo. Mi idea era que no reunieramos aunque sea una vez
> > a la semana y si es posible ponerme al dia.
> > Saludos
> > Mario
> Me parece bárbaro, anda coordinando a la gente que tenga ganas de hacer un
> cursito y pedimos el laboratorio para hacer montones de cosas interesantes.
> Edgar
>
>
>
>
> correo electrónico a: squeakRos-unsubscribe@...
>
>
> correo electrónico a: squeakRos-unsubscribe@...
>
>
> Yahoo! Grupos Enlaces
>
> Para visitar tu grupo en Internet, vé a:
>  http://ar.groups.yahoo.com/group/squeakRos/
>
> Para cancelar tu suscripción a este grupo, enviá un mensaje a:
>  squeakRos-unsubscribe@...
>
> El uso de Yahoo! Grupos se rige por:
>  http://ar.docs.yahoo.com/info/utos.html
>
>

Mensajes 457 - 486 de 3451   Más reciente  |  < Más reciente  |  Más antiguo >  |  Más antiguo
Avanzado

Copyright © 2009 Yahoo! de Argentina S.R.L. Todos los derechos reservados.
Política de privacidad - Condiciones del Servicio - Reglas de la comunidad de Yahoo! - Ayuda