np-eazy / Pentaquad

3 stars 1 forks source link

CoreState: moveTo method #1

Closed np-eazy closed 1 year ago

np-eazy commented 1 year ago

moveTo(direction, x, y)

Behavior: Write a moveTo method that uses repeated activeMoves in a particular direction to move the piece to a particular index on the array. The piece can move as far in the direction passed into moveTo(direction) until it hits another block, but the piece will not be placed unless it hits a block in the direction it is falling.

Invocation: moveTo is to be called every in-game tick, with gravity as direction and x and y as the cursor position mapped to the cell index it is in.

np-eazy commented 1 year ago

Resolved in https://github.com/np-eazy/Pentaquad/pull/27