Skip to content

kurarin: url encoding may ignore the last cell #665

@semiexp

Description

@semiexp

For 5x6 problems, the dot on the most bottom-right cell is ignored.

this.genericDecodeNumber16((bd.dots.length >> 1) | 1, function(idx, val) {

this.genericEncodeNumber16((bd.dots.length >> 1) | 1, function(idx) {

I think (bd.dots.length >> 1) | 1 should be (bd.dots.length + 1) >> 1 in these lines.

  • For 5x6 problems, there are 9*11 = 99 dots
  • We need 50 (= ceil(99/2)) values to encode all the dots
  • (bd.dots.length >> 1) | 1 = 49 | 1 = 49, which is one less than needed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions