Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

collide.floor is weird #57

Open
darkf opened this issue Nov 11, 2018 · 2 comments
Open

collide.floor is weird #57

darkf opened this issue Nov 11, 2018 · 2 comments
Assignees
Labels

Comments

@darkf
Copy link
Contributor

darkf commented Nov 11, 2018

#+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.)

cc @tangentstorm

@tangentstorm
Copy link
Contributor

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...)

What do you think about that?

@darkf
Copy link
Contributor Author

darkf commented Nov 13, 2018

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.

@tangentstorm tangentstorm self-assigned this Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants