From b03bf7db79eb7636ca7a65533e055bdc228927fa Mon Sep 17 00:00:00 2001 From: HagenMarin <131142062+HagenMarin@users.noreply.github.com> Date: Sat, 22 Jun 2024 17:36:23 +0200 Subject: [PATCH 1/2] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index e1f1906..ca70776 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,8 @@ # ComputationalArt Computational Art + +## Ausführung +Zum Starten des Spiels folgenden Befehl im Workspace ausführen: +``` +CAGame new start. +``` From 622eee521d4104048420680fbf20d5efa7dfaf71 Mon Sep 17 00:00:00 2001 From: Lars Schumann Date: Sun, 23 Jun 2024 15:57:02 +0200 Subject: [PATCH 2/2] added game background and border (ui) --- src/ComputationalArt/CADisplay.class.st | 17 ++++++++++------- src/ComputationalArt/CAGame.class.st | 6 +++--- src/ComputationalArt/CAOverlay.class.st | 4 ++-- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/ComputationalArt/CADisplay.class.st b/src/ComputationalArt/CADisplay.class.st index e7d9a1c..4853887 100644 --- a/src/ComputationalArt/CADisplay.class.st +++ b/src/ComputationalArt/CADisplay.class.st @@ -32,14 +32,17 @@ CADisplay >> attachedGrid: aGrid [ { #category : #'as yet unclassified', - #'squeak_changestamp' : 'Sars 6/4/2024 13:34' + #'squeak_changestamp' : 'Sars 6/23/2024 15:54' } CADisplay >> initialize [ cells := OrderedCollection new. - viewMorph := Morph new. - viewMorph bounds: (100@100 corner: 1100@1100). - viewMorph color: Color white. - viewMorph openInWorldOrWorldlet. + viewMorph := Morph new + bounds: (100 @ 100 corner: 1450 @ 1160); + color: (Color r: 176/255 g: 196/255 b: 222/255); + borderColor: Color gray; + borderWidth: 5; + openInWorldOrWorldlet; + yourself. ] { @@ -79,7 +82,7 @@ self wipeCells. { #category : #'as yet unclassified', - #'squeak_changestamp' : 'Sars 6/19/2024 16:41' + #'squeak_changestamp' : 'Sars 6/23/2024 15:39' } CADisplay >> step [ | grid cols rows origin size border gap blockLookup aGrid | @@ -88,7 +91,7 @@ CADisplay >> step [ grid := aGrid grid. cols := aGrid numCols. rows := aGrid numRows. - origin := viewMorph position. + origin := viewMorph position + (320@30). size := 10. border := 1. gap := 0. diff --git a/src/ComputationalArt/CAGame.class.st b/src/ComputationalArt/CAGame.class.st index 9f5f94f..0686433 100644 --- a/src/ComputationalArt/CAGame.class.st +++ b/src/ComputationalArt/CAGame.class.st @@ -83,7 +83,7 @@ CAGame >> skipAhead: stepCount [ { #category : #'as yet unclassified', - #'squeak_changestamp' : 'Sars 6/19/2024 16:50' + #'squeak_changestamp' : 'Sars 6/23/2024 15:56' } CAGame >> start [ | maxIterations iterationCount gameloop ui| @@ -122,13 +122,13 @@ CAGame >> start [ ui := CAOverlay new. - ui position: -200@100. + ui position: 130@130. ui game: self. cellViewMorph addMorph: ui. cellViewMorph position: 750@250. screen step. - maxIterations := 150. + maxIterations := 300. iterationCount := 0. gameloop := [[iterationCount < maxIterations] whileTrue: [(Delay forSeconds: frameDelay) wait. diff --git a/src/ComputationalArt/CAOverlay.class.st b/src/ComputationalArt/CAOverlay.class.st index 086f539..1de23d9 100644 --- a/src/ComputationalArt/CAOverlay.class.st +++ b/src/ComputationalArt/CAOverlay.class.st @@ -25,7 +25,7 @@ CAOverlay >> game: aCAGame [ { #category : #'as yet unclassified', - #'squeak_changestamp' : 'JAL 6/19/2024 16:08' + #'squeak_changestamp' : 'Sars 6/23/2024 15:32' } CAOverlay >> initialize [ super initialize. @@ -35,7 +35,7 @@ CAOverlay >> initialize [ self addMorph: [|c| c:= CAOverlayPlayMenu new. c initialize. c ] value. self addMorph: [|c| c:= CAOverlayBlockMenu new. c initialize. c y: 170. c ] value. - self addMorph: [|c| c:= CAOverlayBrushMenu new. c initialize. c y: 920. c ] value. + self addMorph: [|c| c:= CAOverlayBrushMenu new. c initialize. c y: 900. c ] value. ]