Skip to content

Commit

Permalink
don't know why but every test is running
Browse files Browse the repository at this point in the history
  • Loading branch information
FHeinee committed Jul 12, 2024
1 parent a26e707 commit 83182d1
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 40 deletions.
26 changes: 13 additions & 13 deletions src/InteractivePongTutorial-Game/IPTBall.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Class {

{
#category : #collision,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTBall >> checkCollisionWithPlayer [
(self game playerBounds anySatisfy: [:bounds | bounds intersects: self bounds])
Expand All @@ -23,7 +23,7 @@ IPTBall >> checkCollisionWithPlayer [

{
#category : #collision,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTBall >> checkCollisionWithWalls [
(self position x between: self game left and: self game right - self width)
Expand Down Expand Up @@ -51,31 +51,31 @@ IPTBall >> defaultExtent [

{
#category : #accessing,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTBall >> defaultSpeed [
^ 10.
]

{
#category : #accessing,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTBall >> game [
^ game.
]

{
#category : #accessing,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTBall >> game: aGame [
game := aGame.
]

{
#category : #initialization,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTBall >> initialize [
super initialize.
Expand All @@ -87,23 +87,23 @@ IPTBall >> initialize [

{
#category : #accessing,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTBall >> speed [
^ speed.
]

{
#category : #accessing,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTBall >> speed: aNumber [
speed := aNumber.
]

{
#category : #initialization,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTBall >> startOver [
self
Expand All @@ -113,7 +113,7 @@ IPTBall >> startOver [

{
#category : #stepping,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTBall >> step [
self position: self position + self speed.
Expand All @@ -123,23 +123,23 @@ IPTBall >> step [

{
#category : #stepping,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTBall >> stepTime [
^ 10.
]

{
#category : #movement,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTBall >> turnHorizontal [
self speed: self speed x negated @ self speed y.
]

{
#category : #movement,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTBall >> turnVertical [
self speed: self speed x @ self speed y negated.
Expand Down
26 changes: 13 additions & 13 deletions src/InteractivePongTutorial-Game/IPTGame.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,31 @@ IPTGame class >> open [

{
#category : #accessing,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTGame >> ball [
^ ball.
]

{
#category : #accessing,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTGame >> ball: aBall [
ball := aBall.
]

{
#category : #'event handling',
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTGame >> handlesKeyboard: anEvent [
^ true.
]

{
#category : #initialization,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTGame >> initialize [
super initialize.
Expand All @@ -58,7 +58,7 @@ IPTGame >> initialize [

{
#category : #initialization,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTGame >> initializeBall [
self
Expand All @@ -70,7 +70,7 @@ IPTGame >> initializeBall [

{
#category : #initialization,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTGame >> initializePlayers [
| offset |
Expand All @@ -88,7 +88,7 @@ IPTGame >> initializePlayers [

{
#category : #'event handling',
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTGame >> keyDown: anEvent [
(anEvent keyCharacter asUppercase = $W ) ifTrue: [self playerLeft up].
Expand All @@ -99,7 +99,7 @@ IPTGame >> keyDown: anEvent [

{
#category : #'event handling',
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTGame >> keyUp: anEvent [
({$W.$S} anySatisfy: [ :key |
Expand Down Expand Up @@ -129,39 +129,39 @@ IPTGame >> mouseLeave: anEvent [

{
#category : #accessing,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTGame >> playerBounds [
^ {self playerLeft bounds . self playerRight bounds}.
]

{
#category : #accessing,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTGame >> playerLeft [
^ playerLeft.
]

{
#category : #accessing,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTGame >> playerLeft: aPlayer [
playerLeft := aPlayer.
]

{
#category : #accessing,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTGame >> playerRight [
^ playerRight.
]

{
#category : #accessing,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTGame >> playerRight: aPlayer [
playerRight := aPlayer.
Expand Down
24 changes: 12 additions & 12 deletions src/InteractivePongTutorial-Game/IPTPlayer.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -14,47 +14,47 @@ Class {

{
#category : #'as yet unclassified',
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTPlayer >> defaultExtent [
^ (15@100).
]

{
#category : #accessing,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTPlayer >> defaultSpeed [
^ 10.
]

{
#category : #movement,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTPlayer >> down [
self speed: self defaultSpeed.
]

{
#category : #accessing,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTPlayer >> game [
^ game.
]

{
#category : #accessing,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTPlayer >> game: aGame [
game := aGame.
]

{
#category : #initialization,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTPlayer >> initialize [
super initialize.
Expand All @@ -66,7 +66,7 @@ IPTPlayer >> initialize [

{
#category : #movement,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTPlayer >> move: aNumber [
| dist |
Expand All @@ -77,23 +77,23 @@ IPTPlayer >> move: aNumber [

{
#category : #accessing,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTPlayer >> speed [
^ speed.
]

{
#category : #accessing,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTPlayer >> speed: aNumber [
speed := aNumber.
]

{
#category : #stepping,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTPlayer >> step [
self move: self speed.
Expand All @@ -109,15 +109,15 @@ IPTPlayer >> stepTime [

{
#category : #movement,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTPlayer >> stop [
self speed: 0.
]

{
#category : #movement,
#'squeak_changestamp' : 'FH 7/12/2024 16:33'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTPlayer >> up [
self speed: self defaultSpeed negated.
Expand Down
2 changes: 1 addition & 1 deletion src/InteractivePongTutorial-Tests/IPTLevelTests.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ IPTLevelTests >> testLevelDescriptions [

{
#category : #testing,
#'squeak_changestamp' : 'Josua Zehner 7/10/2024 11:40'
#'squeak_changestamp' : 'FH 7/12/2024 16:43'
}
IPTLevelTests >> testSolutionCode [

Expand Down
2 changes: 1 addition & 1 deletion src/InteractivePongTutorial-Tests/IPTMockGame.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Class {

{
#category : #mockCategory,
#'squeak_changestamp' : 'FH 7/12/2024 16:31'
#'squeak_changestamp' : 'FH 7/12/2024 16:44'
}
IPTMockGame >> mockMethod [
^ false.
Expand Down

0 comments on commit 83182d1

Please sign in to comment.