Open swaroopg92 opened 3 years ago
Hi! I'm willing to contribute one or more of these puzzle parsers. When I can allocate some free time, I'm thinking of adding Heyawake, Slitherlink, Tents, and/or Fillomino.
Thanks for maintaining this awesome piece of software, btw :ok_hand:
Hi @nmay231, 1) Sure, please go ahead. Submit a PR as you implement. I started this mainly to solve the puzzle genres for which the Penpa interface is more friendly (specially numbered puzzles). But there is no reason not to add other types as well. It's mainly time so I prioritize the above ones which I listed. So your help is greatly appreciated and would be a good addition. No priority for me, feel free to add in any order as you please. Let me know if you have any questions. 2) Composite modes are for solving, so yeah it's intended. To solve a Tent's puzzle you only need to place tents and dots. While creating a puzzle to place trees, use Shape -> Special 1 -> Trees (3rd Option)
Thank you very much. I am glad you find it useful.
@nmay231 One of the users (RSP) in the discord server provided this analysis/information that might help. Since you are doing most of puzz.link parsing, thought to share it here:
unnumbered
lits
norinori
numbered
aqre
shimaguni
stostone
heyawake
ayeheya
country
yajilin-regions*
maxiloop*
detour*
nagenawa*
factors*
juosan*
* renders differently
almost works: toichika. arrows dont render
used url p?[id]/10/10/5k88hh20i142e2c5880g3o03vs0001fs02030g123g4g5
then we have another group of multiple numbers in a region. they work the same minus how they parse ? and illegal numbers
armyants
nanro
cojun
renban
meander
bonsan*
heyabon*
satogaeri*
* renders differently
(doesnt quite work)
usoone - works if no illegal numbers (5+)
hanaregumi - works, but creates illegal clues
putteria - works, but creates illegal clues. renders ? as x
makaro - numbers all become +1
used url p?[id]/10/10/5k88hh20i142e2c5880g3o03vs0001fs02030g1k4k23r5l6o7zi.zp
there's also aquarium, kinkonkan, paintarea and sukuroroom (and probably more that i accidentally lost) that just do whatever they want basically
@swaroopg92 Good to know! I'll use that list when I get back to adding more.
Here's some information for conversion of the current genres on pzprxs, and how complex it is to implement:
cbanana -> nurikabe Use default Surface coloring
rassi -> doubleback Change input mode to Rassi Silai composite mode
tontti -> nurikabe Change input mode to Line > Middle.
dotchi -> moonsun Render white and black circles instead of sun and moon.
chainedb -> nurikabe Render numbers inside black squares.
Thanks @x-sheep that's great information and will help in accelerating the development. We will surely reach out to you if any questions. @nmay231 Sorry just tagging you, to make sure you are aware of this information :)
For those who want to support more of the puzzlink puzzles, here are some tips and things to remember:
pzprjs/src/pzpr/variety.js
. It contains a list of information about all variants including the filename (some variants are in the same file) and aliases, if any exist. For example, the Cave variant is implemented in src/variety/kurodoko.js
and has four aliases cave, bag, corral, correl. Decoding/parsing for each variant is done in the decodePzpr()
method.docs/js/general.js
in decode_puzzlink()
with some support functionality in puzzlink.js
.
import requests
def puzzlink(tag_name, count = 100): url = (f"https://puzz.link/db/api/pzvs_anon?limit={count}&sort_key=gt.0&order=sort_key.asc&type=in.(%22{tag_name}"
print(len(puzzlink("cave")))
Things that are easy to forget:
- Check how "." in the puzzle URL-string is rendered. Some puzzles render it as a question mark while others leave it blank.
- Update certain files:
- Include the genre tag(s) of the variant(s) in `docs/js/genre_tags.js`
- Add tests to `test/public/puzz_link.js`
- Add urls to `TESTING.md`
- Update support of the variant(s) in the README.
That said, feel free to ask me or swaroopg92 if you have any questions :)
Users can load puzz.link puzzles into Penpa+ using the "Load" button. It currently supports (not full list, check Readme file for complete list):