Skip to content

Commit

Permalink
Fixed MgdGameModel>>#initializeForSymbols:
Browse files Browse the repository at this point in the history
  • Loading branch information
syrel committed Nov 9, 2017
1 parent 2bddbba commit 8af0857
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ initializeForSymbols: aCollectionOfCharacters
availableCards := (aCollectionOfCharacters asArray
collect: [ :aSymbol |
(1 to: self matchesCount) collect: [ :i |
MgCardModel new symbol: aSymbol ] ] ) flattened shuffled asOrderedCollection
MgdCardModel new symbol: aSymbol ] ] ) flattened shuffled asOrderedCollection
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
drawing
drawBacksideOn: aCanvas

aCanvas stroke
paint: Color paleBlue;
path: (aCanvas shape line: 0@0 to: self extent);
draw.

aCanvas stroke
paint: Color paleBlue;
path: (aCanvas shape line: self width @ 0 to: 0@self height);
draw

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
drawing
drawCommonOn: aCanvas
aCanvas fill
paint: self backgroundPaint;
path: self boundsInLocal;
draw
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
drawing
drawFlippedSideOnSpartaCanvas: aCanvas
drawFlippedSideOn: aCanvas
| font textPainter metrics baseline origin |

font := aCanvas font
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@ drawOnSpartaCanvas: aCanvas
| roundedRectangle |

roundedRectangle := aCanvas shape
roundedRectangle: self boundsInLocal
radii: (BlCornerRadii radius: self cornerRadius).
roundedRectangle: self boundsInLocal
radii: (BlCornerRadii radius: self cornerRadius).

aCanvas clip
by: roundedRectangle
during: [
aCanvas fill
paint: self backgroundPaint;
path: self boundsInLocal;
draw.

self drawCommonOn: aCanvas.
self card isFlipped
ifTrue: [ self drawFlippedSideOnSpartaCanvas: aCanvas ]
ifFalse: [ self drawBacksideOnSpartaCanvas: aCanvas ] ]
ifTrue: [ self drawFlippedSideOn: aCanvas ]
ifFalse: [ self drawBacksideOn: aCanvas ] ]

0 comments on commit 8af0857

Please sign in to comment.