[squeak-dev] The Inbox: EToys-jl.231.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Sep 1 12:24:42 UTC 2016


A new version of EToys was added to project The Inbox:
http://source.squeak.org/inbox/EToys-jl.231.mcz

==================== Summary ====================

Name: EToys-jl.231
Author: jl
Time: 1 September 2016, 2:23:37.830565 pm
UUID: 9217d357-f7a9-e04f-bab3-a98d904576ac
Ancestors: EToys-jl.230

fixed test tiles in kedama for new block generation

=============== Diff against EToys-jl.230 ===============

Item was changed:
  ----- Method: KedamaTurtleVectorPlayer2>>test:ifTrue:ifFalse: (in category 'command execution') -----
  test: cond ifTrue: trueBlock ifFalse: falseBlock
  
+ 	| origPredicate c actualCond condValue |
+ 
- 	| origPredicate c actualCond |
  	(cond == true or: [cond == false]) ifTrue: [
  		^ cond ifTrue: [trueBlock value: self] ifFalse: [falseBlock value: self].
  	].
  	actualCond := cond.
  	cond isBlock ifTrue: [
  		actualCond := ByteArray new: predicate size.
+ 		condValue := cond value. 
+ 		condValue isCollection 
+ 			ifTrue: [
+ 				actualCond := condValue.
+ 			] ifFalse: [
+ 				1 to: predicate size do: [:i | actualCond at: i put: (cond value ifTrue: [1] ifFalse: [0])]
+ 			]
- 		1 to: predicate size do: [:i | actualCond at: i put: (cond value ifTrue: [1] ifFalse: [0])]
  	].
  	origPredicate := predicate clone.
  	predicate bytesAnd: actualCond.
  	trueBlock value: self.
  
  	c := actualCond clone.
  	c not.
  	predicate replaceFrom: 1 to: (predicate size min: origPredicate size) with: origPredicate startingAt: 1.
  	predicate bytesAnd: c.
  	falseBlock value: self.
  	predicate replaceFrom: 1 to: (predicate size min: origPredicate size) with: origPredicate startingAt: 1.!

Item was changed:
  ----- Method: Object>>test:ifTrue:ifFalse: (in category '*Etoys-Squeakland-Tweak-Kedama') -----
  test: cond ifTrue: trueBlock ifFalse: falseBlock
  
+ 	cond value ifTrue: [trueBlock value: self] ifFalse: [falseBlock value: self].
- 	cond ifTrue: [trueBlock value: self] ifFalse: [falseBlock value: self].
  !



More information about the Squeak-dev mailing list