knewjade / tetris-fumen

A NPM package to Encode/Decode fumen for tetris
MIT License
14 stars 2 forks source link

field.fill can't draw floating pieces #2

Closed eight04 closed 4 years ago

eight04 commented 4 years ago

data: https://harddrop.com/fumen/?v115@vhAVLn Code:

const {decoder} = require("tetris-fumen");
const pages = decoder.decode("v115@vhAVLn");
console.log(pages[0].field.str());
pages[0].field.fill(pages[0].operation);

Result:

Error: Cannot fill piece on field

REPL

Is this intended? Quote from README:

Fill piece even if not on the ground, and return the mino as the placed

If floating pieces are not allowed, how does it differ from field.put?

knewjade commented 4 years ago

@eight04 Sorry, it's bug. I fixed it in v1.1.1. thank you.