Giter VIP home page Giter VIP logo

phil's People

Contributors

keiranking avatar raphlinus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phil's Issues

Black block percentage

It would be great to see a percentage amount of black blocks vs letter blocks displayed somewhere. We know that keeping it in a certain range is preferred and it would be helpful to see that number as we're tweaking the grid.

Autofill not working.

Autofill button does nothing.

Also....is there a way to adjust the size of the grid, or are we limited to 15x15?

Rebus support?

Hi Keiran,

First of all, thank you for making this tool! It's awesome!

One question (not really an issue, hope that is okay) -- is there a way to create a puzzle that contains a rebus?

Thanks,
Ruth

Emscripten errors on installing

Following the readme, I did brew install emscripten. When it was complete, I tried the make xwsolve.js and receive the following:

third_party/glucose-3.0/simp  master ✔                                                                                                                   156d
➢ make xwsolve.js
Compiling: /Users/caleb/Documents/git/thompsch/Phil/third_party/glucose-3.0/simp/Main.o
WARNING:root:LLVM version appears incorrect (seeing "9.1", expected "6.0")
CRITICAL:root:fastcomp in use, but LLVM has not been built with the JavaScript backend as a target, llc reports:
===========================================================================
(no targets could be identified: [Errno 2] No such file or directory)
===========================================================================
CRITICAL:root:you can fall back to the older (pre-fastcomp) compiler core, although that is not recommended, see http://kripken.github.io/emscripten-site/docs/building_from_source/LLVM-Backend.html
INFO:root:(Emscripten: Running sanity checks)
ERROR:root:Cannot find /usr/bin/llvm-link, check the paths in ~/.emscripten
make: *** [/Users/caleb/Documents/git/thompsch/Phil/third_party/glucose-3.0/simp/Main.o] Error 1

Mobile support?

Hi there -- my mom would like to use this to construct puzzles, but she only has an iPad. When using the website on mobile, the keyboard does not appear, presumably because the grid is not seen as being "input". I'll probably try to look at this on my own at some point and submit a PR but just wondering if there's a reason it's not supported, or if a small quick fix is possible. Thanks!

Support for 21 x 21 Sunday-Sized Puzzles

I really like the idea and the interface for this tool. How difficult would it be to support puzzles of a different size. Say a 21 X 21?

I'm an okay programmer by trade. Maybe I could make a pull request if you can point me in the right direction.

Numbering incorrect?

I'm not sure if there's already a way to do this and I'm just missing it... in the image below, the number 19 shouldn't be there, right? There's no word that starts there, either down or across.

I'd be glad to take a look and work on this (this is an incredible tool!), I just don't want to duplicate work if there's already a way.

screen shot 2018-09-26 at 2 58 22 pm

I believe the relevant code is here:

Phil/cross.js

Lines 535 to 566 in 58243dd

function updateLabelsAndClues() {
let count = 1;
for (let i = 0; i < xw.rows; i++) {
for (let j = 0; j < xw.cols; j++) {
let isAcross = false;
let isDown = false;
if (xw.fill[i][j] != BLACK) {
isDown = i == 0 || xw.fill[i - 1][j] == BLACK;
isAcross = j == 0 || xw.fill[i][j - 1] == BLACK;
}
const grid = document.getElementById("grid");
let currentCell = grid.querySelector('[data-row="' + i + '"]').querySelector('[data-col="' + j + '"]');
if (isAcross || isDown) {
currentCell.firstChild.innerHTML = count; // Set square's label to the count
count++;
} else {
currentCell.firstChild.innerHTML = "";
}
if (isAcross) {
xw.clues[[i, j, ACROSS]] = xw.clues[[i, j, ACROSS]] || DEFAULT_CLUE;
} else {
delete xw.clues[[i, j, ACROSS]];
}
if (isDown) {
xw.clues[[i, j, DOWN]] = xw.clues[[i, j, DOWN]] || DEFAULT_CLUE;
} else {
delete xw.clues[[i, j, DOWN]];
}
}
}
}

Serve this Application via Github Pages

Since you're working in Javascript, I was thinking it might be really cool if you could try serving this page with the "Github Pages" function. It does serve static HTML/CSS/Javascript files, even though the resources for it heavily push it as a Jekyll blog host.

Here's a gist to copy master to a branch that makes a web page: https://gist.github.com/mandiwise/44d1edce18f2ffb14f63

Once that's done, you should be able to reach your page from any browser over http://keiranking.github.io/kCrossword

(note it takes github about 10 minutes to start serving an update over github.io)

some clues truncated in PUZ export

When a clue has more than one period in it, it is truncated immediately before the second period when exported to PUZ format.

For instance, a crossword is created with 1 across being "First U.S. President".
It is exported to PUZ format.
When loaded into any program that supports PUZ format, the clue becomes "First U.S"
I have tested this with:
Across Lite Mac and Windows versions
Puzzle Solver (https://www.crosswordsolver.info/)
HTML5 PUZ file reader (http://derekslager.com/puz/)
loading back into Phil from the PUZ file

Clues & numbering for non-Times grids

Loving this program! I know it's designed for NY Times grids but I'm trying to use it for an Aussie/British style layout and it's having problems working out where the clues are. I've taken a browse through the code and it seems that it's only checking whether the previous square is black before deciding there's a clue there - which in the rest of the world's grids means a whole lot of extra numbers.

I've attached a demo .pdf to show what I mean: blank-grid.pdf

I've taken a look at the code and I think I've worked out a simple fix, one that checks whether a black square is before AND after each white square before determining its viability. This should still leave the NY-times version unchanged while supporting other grid layouts!

cross.js, lines 542 & 543:

isDown = i == 0 || xw.fill[i - 1][j] == BLACK && i == xw.rows - 1 || xw.fill[i + 1][j] != BLACK; 
isAcross = j == 0 || xw.fill[i][j - 1] == BLACK && j == xw.cols - 1 || xw.fill[i][j + 1] != BLACK;

Hope it helps,
Dan

Auto-fill does not work with local build of xwsolve.js

After solving the issue I mentioned in #17, I successfully built the .js and .wasm.

But trying to run it I see in console

[Warning] Invalid function pointer called with signature 'iii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this) (xwsolve.js, line 1)

What is the purpose of auto-fill? Even on your website I can't tell what it does (and FWIW it does not spew this error)

Undo function?

I was trying out Phil and found it delightful how quickly I was making progress on an idea. Then I accidentally clicked on the "generate pattern" button, and poof! everything disappeared except the title. Is there a way to undo an action? I tried CTRL-Z to no avail...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.