Skip to content

Commit 85f6ac5

Browse files
authored
Merge pull request #87 from hpi-swa-teaching/dev-linus
removed unnecessary rule checking
2 parents 88124ee + 11703a5 commit 85f6ac5

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

src/SIY-Game/SIYArena.class.st

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -268,17 +268,16 @@ SIYArena >> positionDictionary [
268268

269269
{
270270
#category : #movement,
271-
#'squeak_changestamp' : 'LK 1/6/2024 19:28'
271+
#'squeak_changestamp' : 'LK 1/12/2024 23:29'
272272
}
273273
SIYArena >> postMoveBlocksRoutine [
274274
"This routine gets triggered, after every block has been moved through the moveBlocksDirection method, for example after keyboard input.
275275
This routine will NOT get triggered, if blocks are moved using the halo."
276276

277277
self ruleManager updateRulesInArena: self.
278-
279-
"check rules for all SIYYou blocks again (sometimes necessary),
280-
direction for queue generation doesn't matter"
281-
(self blockMediator generateQueueForDirection: 1@0)
278+
279+
"check rules for all blocks"
280+
(self blockMediator getBlocksOfType: SIYBlock)
282281
do: [:aBlock | self ruleManager checkRulesFor: aBlock].
283282

284283
self undoCaretaker createSnapshotOf: self.
@@ -382,13 +381,13 @@ SIYArena >> scaleFactor: aScaleFactor [
382381

383382
{
384383
#category : #stepping,
385-
#'squeak_changestamp' : 'KD 1/8/2024 15:10'
384+
#'squeak_changestamp' : 'LK 1/12/2024 20:25'
386385
}
387386
SIYArena >> slowStepTime [
388387
"slower step time affects the delay between block movements, while a keyboard
389388
button is held down"
390389

391-
^ 180
390+
^ 155
392391
]
393392

394393
{

src/SIY-Game/SIYBlock.class.st

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,15 +538,15 @@ SIYBlock >> position: aPoint [
538538

539539
{
540540
#category : #movement,
541-
#'squeak_changestamp' : 'LK 1/4/2024 14:30'
541+
#'squeak_changestamp' : 'LK 1/12/2024 23:29'
542542
}
543543
SIYBlock >> postMoveRoutine: aDirection [
544544
"This routine gets triggered, after the block has been moved using basicMove,
545545
for example through keyboard inputs. It will NOT get triggered, if the block has been
546546
moved using the halo."
547547

548548
self setTextureForDirection: aDirection.
549-
self ruleManager checkRulesFor: self
549+
"self ruleManager checkRulesFor: self"
550550
]
551551

552552
{

0 commit comments

Comments
 (0)