You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#+name: collide.floor
#+begin_src
> cT vvvv vvvv vvvv vvvv vvvv vvvv Pq
. . . . . . . . . . # 0
. . . . . . . . . . # 1
. . . . . . . . . . # 2
. . . . . . . . . . # 3
. . . . . . . . . . # 4
. . . . . . . . . . # 5
. . . . . . . . . . # 6
. . . . . . . . . . # 7
. . . . . . . . . . # 8
. . . . . . . . . . # 9
. . . . . . . . . . # 10
. . . . . . . . . . # 11
. . . . . . . . . . # 12
. . . . . . . . . . # 13
. . . . . . . . . . # 14
. . . . . . . . . . # 15
. . . . . . . . . . # 16
. . . . . . . . . . # 17
. . . . . . . . . . # 18
. . . . . . . . . . # 19
. . . . M . . . . . # 20
. . . M M M . . . . # 21
= Oh, how the Mighty have Fallen...
: Once upon a time, a T tetramino spawned at the
: top of the well, and used the 'v' command to
: move down by one cell 24 times. Sadly, it was
: unable to burrow into the earth and spent the
: remainder of its life standing on its head at
: the bottom of a well.
#+end_src
It moves down past the end of the screen.
In Tetris, as soon as it hits the bottom of the screen it should be considered a hard drop like V and change to a new tetromino.
Learntris assumes the T is still active even as it goes beyond the scren and is dropped... which makes no sense at all. The tetris implementation should select a new tetromino.
It should also not use P because that implies it's still active.
So it should be something like cT vvvv vvvv vvvv vvvv vvvv pq (move 20 rows down, then print normally.)
I get what you're saying here. To be clear, it's only when you push past the bottom that it's a hard drop: you absolutely can rest on the bottom of the well and spin the piece (at least in modern tetris).
One small problem is that at this point in the narrative, we haven't implemented "stamping" the active tetramino into the well. (IIRC, that test follows shortly after...)
The bigger problem is I mostly just wanted to break things into tiny tiny pieces, so that you could pass each test with a fairly small amount of code.
So... If it's confusing, I'm inclined to make this a change to the text, so it explains to people not to worry about taking on too much here. (The current text is fairly silly...)
It was really confusing me so explaining what a hard drop is and that it goes one past the bottom would be helpful.
you absolutely can rest on the bottom of the well and spin the piece
My point was that this goes 24 down, well past the bottom of the well. It should "stamp" then. Then P should not show it as still the active tetromino because it shouldn't be active anymore after it stamps. (Otherwise you get weird stuff like being able to move it around to make more copies of it.)
Think of the implementation after this test. Once you implement stamping on the bottom this test no longer makes any sense.
I'd also add a test to test manual hard drops / "stamps" after it.
It moves down past the end of the screen.
In Tetris, as soon as it hits the bottom of the screen it should be considered a hard drop like V and change to a new tetromino.
Learntris assumes the T is still active even as it goes beyond the scren and is dropped... which makes no sense at all. The tetris implementation should select a new tetromino.
It should also not use P because that implies it's still active.
So it should be something like
cT vvvv vvvv vvvv vvvv vvvv pq
(move 20 rows down, then print normally.)cc @tangentstorm
The text was updated successfully, but these errors were encountered: