New puzzle: 'Mosaic'.

This is similar in concept to Minesweeper, in that each clue tells you
the number of things (in this case, just 'black squares') in the
surrounding 3x3 grid section.

But unlike Minesweeper, there's no separation between squares that can
contain clues, and squares that can contain the things you're looking
for - a clue square may or may not itself be coloured black, and if
so, its clue counts itself.

So there's also no hidden information: the clues can all be shown up
front, and the difficulty arises from the game generator choosing
which squares to provide clues for at all.

Contributed by a new author, Didi Kohen. Currently only has one
difficulty level, but harder ones would be possible to add later.
This commit is contained in:
Simon Tatham
2021-04-25 09:59:15 +01:00
parent 77866e1335
commit 0377184510
8 changed files with 1725 additions and 2 deletions

1
.gitignore vendored
View File

@ -46,6 +46,7 @@ include/
/matching
/mines
/mineobfusc
/mosaic
/net
/netslide
/nullgame

View File

@ -116,6 +116,12 @@ puzzle(mines
OBJECTIVE "Find all the mines without treading on any of them.")
cliprogram(mineobfusc mines.c COMPILE_DEFINITIONS STANDALONE_OBFUSCATOR)
puzzle(mosaic
DISPLAYNAME "Mosaic"
DESCRIPTION "Grid-filling puzzle"
OBJECTIVE "Fill in the grid given clues about number of \
nearby black squares.")
puzzle(net
# The Windows Net shouldn't be called 'net.exe', since Windows
# already has a reasonably important utility program by that name!

View File

@ -3,7 +3,7 @@ This software is copyright (c) 2004-2014 Simon Tatham.
Portions copyright Richard Boulton, James Harvey, Mike Pinna, Jonas
Kölker, Dariusz Olszewski, Michael Schierl, Lambros Lambrou, Bernd
Schmidt, Steffen Bauer, Lennard Sprong, Rogier Goossens, Michael
Quevillon and Asher Gordon.
Quevillon, Asher Gordon and Didi Kohen.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files

11
html/mosaic.html Normal file
View File

@ -0,0 +1,11 @@
Mosaic
<p>
Colour every square either black or white.
Each number indicates how many black squares are in the 3&times;3 square
surrounding the number &#8211; <em>including</em> the clue square
itself.
<p>
Left-click in an empty square to turn it black, or right-click to turn
it white. Click again in an already-filled square to cycle it between
black and white and empty. You can left- or right-drag to set multiple
squares at once.

View File

@ -55,6 +55,7 @@ set(lightup_crop 256x256 112x112+144+0)
set(loopy_crop 257x257 113x113+0+0)
set(magnets_crop 264x232 96x96+36+100)
set(mines_crop 240x240 110x110+130+130)
set(mosaic_crop 288x288 97x97+142+78)
set(net_crop 193x193 113x113+0+80)
set(netslide_crop 289x289 144x144+0+0)
set(palisade_crop 288x288 192x192+0+0)

54
icons/mosaic.sav Normal file
View File

@ -0,0 +1,54 @@
SAVEFILE:41:Simon Tatham's Portable Puzzle Collection
VERSION :1:1
GAME :6:Mosaic
PARAMS :7:8x8a0h1
CPARAMS :7:8x8a0h1
SEED :15:393271218291393
DESC :41:b2c3b4a2a5c6e3a55c6a5a4244e0c3a64d4b4232b
TIME :7:214.795
NSTATES :2:45
STATEPOS:2:45
MOVE :4:T2,5
MOVE :10:d3,5,2,5,2
MOVE :10:d4,5,3,5,2
MOVE :10:d4,4,4,5,2
MOVE :10:d3,4,4,4,2
MOVE :10:d2,4,3,4,2
MOVE :4:T2,6
MOVE :10:d3,6,2,6,2
MOVE :10:d4,6,3,6,2
MOVE :4:t1,6
MOVE :4:t1,7
MOVE :10:d2,7,1,7,1
MOVE :10:d3,7,2,7,1
MOVE :4:T4,7
MOVE :4:t5,6
MOVE :10:d5,7,5,6,1
MOVE :4:T6,6
MOVE :10:d6,7,6,6,2
MOVE :4:t7,7
MOVE :10:d7,6,7,7,1
MOVE :10:d7,5,7,6,1
MOVE :10:d6,5,7,5,1
MOVE :4:T6,4
MOVE :10:d7,4,6,4,2
MOVE :4:T1,5
MOVE :4:t1,4
MOVE :10:d0,4,1,4,1
MOVE :10:d0,3,0,4,1
MOVE :10:d1,3,0,3,1
MOVE :4:t0,5
MOVE :4:t0,6
MOVE :10:d0,7,0,6,1
MOVE :4:t2,3
MOVE :4:t3,3
MOVE :4:T4,3
MOVE :4:t5,3
MOVE :10:d5,4,5,3,1
MOVE :10:d5,5,5,4,1
MOVE :4:T6,3
MOVE :4:t7,3
MOVE :10:d7,2,7,3,1
MOVE :10:d6,2,7,2,1
MOVE :4:T6,1
MOVE :10:d7,1,6,1,2

1600
mosaic.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -3354,6 +3354,56 @@ These parameters are available from the \q{Custom...} option on the
\dd The size of the regions into which the grid must be subdivided.
\C{mosaic} \i{Mosaic}
\cfg{winhelp-topic}{games.mosaic}
You are given a grid of squares, which you must colour either black or
white.
Some squares contain clue numbers. Each clue tells you the number of
black squares in the 3\times\.3 region surrounding the clue \dash
\e{including} the clue square itself.
This game is variously known in other locations as: ArtMosaico, Count
and Darken, Cuenta Y Sombrea, Fill-a-Pix, Fill-In, Komsu Karala,
Magipic, Majipiku, Mosaico, Mosaik, Mozaiek, Nampre Puzzle,
Nurie-Puzzle, Oekaki-Pix, Voisimage.
Mosaic was contributed to this collection by Didi Kohen. Colour design
by Michal Shomer. The implementation is loosely based on
\W{https://github.com/mordechaim/Mosaic}\cw{github.com/mordechaim/Mosaic}.
\H{mosaic-controls} \I{controls, for Mosaic}Mosaic controls
To play Unruly, click the mouse in a square to change its colour.
Left-clicking an empty square will turn it black, and right-clicking
will turn it white. Keep clicking the same button to cycle through the
three possible states for the square.
If you hold down the mouse button and drag, you can colour multiple
cells in a single action.
You can also use the cursor keys to move around the grid. Pressing the
return or space keys will turn an empty square black or white
respectively (and then cycle the colours in the same way as the mouse
buttons), and pressing Backspace will reset a square to empty.
\H{Mosaic-parameters} \I{parameters, for Mosaic}Mosaic parameters
These parameters are available from the \q{Custom...} option on the
\q{Type} menu.
\dt \e{Width}, \e{Height}
\dd Size of grid in squares.
\dt \e{Aggressive generation}
\dd With this option set, the game generator will try harder to
eliminate unnecessary clues on the board. This slows down generation,
so it's not recommended for boards larger than, say, 30\times\.30.
\A{licence} \I{MIT licence}\ii{Licence}
This software is \i{copyright} 2004-2014 Simon Tatham.
@ -3361,7 +3411,7 @@ This software is \i{copyright} 2004-2014 Simon Tatham.
Portions copyright Richard Boulton, James Harvey, Mike Pinna, Jonas
K\u00F6{oe}lker, Dariusz Olszewski, Michael Schierl, Lambros Lambrou,
Bernd Schmidt, Steffen Bauer, Lennard Sprong, Rogier Goossens, Michael
Quevillon and Asher Gordon.
Quevillon, Asher Gordon and Didi Kohen.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files