Skip to content

Commit

Permalink
Merge branch 'main' into ui-julian2
Browse files Browse the repository at this point in the history
  • Loading branch information
jal1604 authored Jun 23, 2024
2 parents fef68cc + 10aeaf0 commit 9ff2b00
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
# ComputationalArt
Computational Art

## Ausführung
Zum Starten des Spiels folgenden Befehl im Workspace ausführen:
```
CAGame new start.
```
17 changes: 10 additions & 7 deletions src/ComputationalArt/CADisplay.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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.
]

{
Expand Down Expand Up @@ -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 |
Expand All @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions src/ComputationalArt/CAGame.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down Expand Up @@ -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.
Expand Down
3 changes: 0 additions & 3 deletions src/ComputationalArt/CAOverlay.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ CAOverlay >> game: aCAGame [
CAOverlay >> initialize [
| lastHeight menus|
super initialize.
self color: Color transparent.

menus := OrderedCollection new.
menus add: CAOverlayPlayMenu new.
Expand All @@ -46,6 +45,4 @@ CAOverlay >> initialize [
self fitChildren.
self padding: (Rectangle origin: 10@10 corner: 10@10).
self color: Color gray.


]

0 comments on commit 9ff2b00

Please sign in to comment.