Skip to content

Commit

Permalink
Spielbeschreibung hinzugefügt, speed angepasst
Browse files Browse the repository at this point in the history
  • Loading branch information
nelerodenhagen committed Jul 5, 2024
1 parent e51e8ce commit bcde056
Show file tree
Hide file tree
Showing 9 changed files with 143 additions and 52 deletions.
111 changes: 79 additions & 32 deletions .squot-materialize
Original file line number Diff line number Diff line change
@@ -1,93 +1,140 @@
[
SquotPlaintextMapper {
#path : FSAbsolutePath [
'README.md'
],
#encoding : 'TXT'
},
SquotPlaintextMapper {
#path : FSAbsolutePath [
'.smalltalk.ston'
],
#encoding : 'TXT'
},
SquotImageMapper {
#path : FSAbsolutePath [
'assets',
'stop.png'
'Cloverleaf.png'
],
#encoding : Class [ #PNGReadWriter ]
},
SquotImageMapper {
SquotPlaintextMapper {
#path : FSAbsolutePath [
'assets',
'Kara-FacingDown.png'
'.github',
'workflows',
'automatic-release.yml'
],
#encoding : @4
#encoding : 'TXT'
},
SquotImageMapper {
#path : FSAbsolutePath [
'assets',
'Trunk.png'
'play.png'
],
#encoding : @4
#encoding : @8
},
SquotImageMapper {
SquotPlaintextMapper {
#path : FSAbsolutePath [
'assets',
'pause.png'
'LICENSE'
],
#encoding : @4
#encoding : 'TXT'
},
SquotTonelMapper {
#package : MCPackage {
#name : 'SqueakKara'
#name : 'SqueakKara-Tests'
},
#path : FSAbsolutePath [
'src'
]
},
SquotPlaintextMapper {
#path : FSAbsolutePath [
'.github',
'workflows',
'automatic-testing.yml'
],
#encoding : 'TXT'
},
SquotPlaintextMapper {
#path : FSAbsolutePath [
'.filetree'
],
#encoding : 'TXT'
},
SquotImageMapper {
#path : FSAbsolutePath [
'assets',
'Kara-FacingRight.png'
'stop.png'
],
#encoding : @8
},
SquotPlaintextMapper {
#path : FSAbsolutePath [
'src',
'.properties'
],
#encoding : @4
#encoding : 'TXT'
},
SquotImageMapper {
#path : FSAbsolutePath [
'assets',
'play.png'
'Kara-FacingUp.png'
],
#encoding : @4
#encoding : @8
},
SquotImageMapper {
#path : FSAbsolutePath [
'assets',
'Kara-FacingLeft.png'
'pause.png'
],
#encoding : @4
#encoding : @8
},
SquotTonelMapper {
#package : MCPackage {
#name : 'SqueakKara-Tests'
#name : 'SqueakKara-Core'
},
#path : @17
},
SquotImageMapper {
#path : FSAbsolutePath [
'src'
]
'assets',
'Trunk.png'
],
#encoding : @8
},
SquotImageMapper {
#path : FSAbsolutePath [
'assets',
'Kara-FacingUp.png'
'Kara-FacingLeft.png'
],
#encoding : @4
#encoding : @8
},
SquotTonelMapper {
#package : MCPackage {
#name : 'SqueakKara-Core'
#name : 'BaselineOfSqueakKara'
},
#path : @17
},
SquotTonelMapper {
#package : MCPackage {
#name : 'SqueakKara'
},
#path : @22
#path : FSAbsolutePath [
'src'
]
},
SquotImageMapper {
#path : FSAbsolutePath [
'assets',
'Cloverleaf.png'
'Kara-FacingRight.png'
],
#encoding : @4
#encoding : @8
},
SquotTonelMapper {
#package : MCPackage {
#name : 'BaselineOfSqueakKara'
},
#path : @22
SquotImageMapper {
#path : FSAbsolutePath [
'assets',
'Kara-FacingDown.png'
],
#encoding : @8
}
]
4 changes: 2 additions & 2 deletions src/SqueakKara-Core/SKExecuter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ SKExecuter >> executeBlock: aBlock [

{
#category : #initialization,
#'squeak_changestamp' : 'JJG 7/1/2024 15:09'
#'squeak_changestamp' : 'NR 7/5/2024 11:53'
}
SKExecuter >> initialize [

self kara: SKKaraDecorator new.
self kara executer: self.
self compiler: Compiler new.
self speed: 5.
self speed: 25.
self state: #terminated.
^ self
]
Expand Down
15 changes: 15 additions & 0 deletions src/SqueakKara-Core/SKGrid.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,21 @@ Class {
#'squeak_changestamp' : 'JJG 7/1/2024 15:48'
}

{
#category : #'instance creation',
#'squeak_changestamp' : 'NR 7/5/2024 12:01'
}
SKGrid class >> newWithChallenge: aNumber [

"comment stating purpose of message"






]

{
#category : #'instance creation',
#'squeak_changestamp' : 'JJG 6/5/2024 17:29'
Expand Down
18 changes: 12 additions & 6 deletions src/SqueakKara-Core/SKWorkspace.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,21 @@ SKWorkspace >> close [

{
#category : #accessing,
#'squeak_changestamp' : 'JJG 7/1/2024 15:12'
#'squeak_changestamp' : 'NR 7/5/2024 15:14'
}
SKWorkspace >> getExampleCode [

^ '[kara onCloverleaf not]
whileTrue: [
kara trunkAhead
ifTrue: [kara turn: right]
ifFalse: [kara move]]'
^ '"
To solve this challenge use following functions:
COMMANDS: kara
move, turn left/right
SENSOREN: kara
onCloverleaf, trunkAhead
"
'


]

Expand Down
5 changes: 3 additions & 2 deletions src/SqueakKara-Tests/SKEnvironmentTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,18 @@ SKEnvironmentTest >> testCreation [

{
#category : #testing,
#'squeak_changestamp' : 'JJG 6/18/2024 18:19'
#'squeak_changestamp' : 'NR 7/5/2024 14:00'
}
SKEnvironmentTest >> testDetectCloverleaf [

self environment workspace userCode: 'kara onCloverleaf ifTrue: [kara move]'.
SKCloverleaf newInGrid: self environment grid at: 1 @ 1.
"self environment executer speed: 0."
self environment run.
self environment executer step.
self environment executer step.
self environment executer step.
self assert: self environment kara coordinates = (2 @ 1)
self assert: (self environment kara coordinates = (2 @ 1))
]

{
Expand Down
5 changes: 3 additions & 2 deletions src/SqueakKara/SKEnvironmentTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,18 @@ SKEnvironmentTest >> testCreation [

{
#category : #testing,
#'squeak_changestamp' : 'JJG 6/18/2024 18:19'
#'squeak_changestamp' : 'NR 7/5/2024 14:00'
}
SKEnvironmentTest >> testDetectCloverleaf [

self environment workspace userCode: 'kara onCloverleaf ifTrue: [kara move]'.
SKCloverleaf newInGrid: self environment grid at: 1 @ 1.
"self environment executer speed: 0."
self environment run.
self environment executer step.
self environment executer step.
self environment executer step.
self assert: self environment kara coordinates = (2 @ 1)
self assert: (self environment kara coordinates = (2 @ 1))
]

{
Expand Down
4 changes: 2 additions & 2 deletions src/SqueakKara/SKExecuter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ SKExecuter >> executeBlock: aBlock [

{
#category : #initialization,
#'squeak_changestamp' : 'JJG 7/1/2024 15:09'
#'squeak_changestamp' : 'NR 7/5/2024 11:53'
}
SKExecuter >> initialize [

self kara: SKKaraDecorator new.
self kara executer: self.
self compiler: Compiler new.
self speed: 5.
self speed: 25.
self state: #terminated.
^ self
]
Expand Down
15 changes: 15 additions & 0 deletions src/SqueakKara/SKGrid.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,21 @@ Class {
#'squeak_changestamp' : 'JJG 7/1/2024 15:48'
}

{
#category : #'instance creation',
#'squeak_changestamp' : 'NR 7/5/2024 12:01'
}
SKGrid class >> newWithChallenge: aNumber [

"comment stating purpose of message"






]

{
#category : #'instance creation',
#'squeak_changestamp' : 'JJG 6/5/2024 17:29'
Expand Down
18 changes: 12 additions & 6 deletions src/SqueakKara/SKWorkspace.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,21 @@ SKWorkspace >> close [

{
#category : #accessing,
#'squeak_changestamp' : 'JJG 7/1/2024 15:12'
#'squeak_changestamp' : 'NR 7/5/2024 15:14'
}
SKWorkspace >> getExampleCode [

^ '[kara onCloverleaf not]
whileTrue: [
kara trunkAhead
ifTrue: [kara turn: right]
ifFalse: [kara move]]'
^ '"
To solve this challenge use following functions:
COMMANDS: kara
move, turn left/right
SENSOREN: kara
onCloverleaf, trunkAhead
"
'


]

Expand Down

0 comments on commit bcde056

Please sign in to comment.