STUFF TO BE ADDED

planned stuff for v1.0:
- remove greyed-out buttons
- add instructions and credits in readme

planned stuff for v1.5:
- in-game instructions
- in-game credits
- resizable numbers for display in puzzles
  - make a collection of non-horizontal line segments and circle arcs.
    try to describe each letter with as few segments as possible. stupid
    algorithm for rendering: for each pixel, loop through each segment
    and count the number of segments to the left of the current pixel.
    if there's an odd number of segments, the pixel is font, otherwise it's
    background. warning, runtime is x*y*lines.
    arrows for yajilin are also needed, as well as symbols for future games.
    or maybe read in knuth-metafont and pick up ideas
- kuromasu: centered number in circle
- yajilin: nice resizable arrows
- some more games (see long list below)

other stuff in order of desiredness:
- for extremely time intensive solving heuristics: estimate the number
  of combinations needed to investigate for a given move and try moves
  in order of increasing work
- menu: add keyboard repeat to arrow keys in table
- add achievements! for instance:
  - complete at least one puzzle of each type without using hints
  - complete one puzzle of difficulty "medium" or higher without using hints
  - complete one puzzle of difficulty "hard" or higher without using hints
  - complete one puzzle of difficulty "extra"/"extreme" or higher without
    using hints
  - complete one puzzle using the hint function only
  - complete a puzzle using no unnecessary moves, without using hints, no
    undo
  - complete a puzzle in less than 1 minute/30 seconds/10 seconds/5 seconds
    without using hints
  - complete 1/10/100/1000/10000 puzzles without using hints
  - complete at least 50% of all puzzles of any type
  - complete all puzzles of any type
  - complete a puzzle of size 45*31 or higher
  - complete a puzzle of size 50*50 or higher
- randomly generated puzzles!
- print error message (at least into log.txt or error.txt) when something
  bad happens
- add music! make algorithmic music with several separate channels that can be
  shuffled and mixed in a lot of different ways. add real-time effects such as
  filter and reverb.
- change difficulty from string to int (can be done by changing the grabber
  programs, changing each loadpuzzle() (use table lookup to display string)
  and change all files (don't regrab them, but make a program to go through
  all files and replace string with int)
- make better controls:
  - hold mouse button and mark multiple cells in one motion
- the code is very messy with lots of duplication, but i've decided against
  refactoring
- nurikabe: make fancier controls such as enclose finalized island, fill
  enclosed region with island
- nurikabe: improve the solver, get those last puzzles!
- heyawake: improve solver speed, 8 hours on heyC138 is way too much. check
  if it has anything to do with that rectangle with 16 cells, and rectify
- picross: make better legalrow,legalcolumn routines: given clues and
  partially filled in cells, is it possible to finish correctly? use dp
- hitori: improve solver (it's not very good right now)
- masyu: improve solver (it's not very good right now)
- slitherlink: improve solver (it's not very good right now)
- minesweeper: improve solver, it struggles with mines left
- yajilin: add v as legal number. don't know why it was removed in the first
  place, the direction is in another layer

- add games (higher up => more likely to be implemented, either because it's
  easy to implement or the game looks more interesting/fun to me). number in
  brackets indicate the number of puzzles at janko.
  - numberlink (arukone) [210] http://www.janko.at/Raetsel/Arukone/index.htm
    - normal edge dragging, easily stolen from masyu
    - also check the variants arukone^2 and arukone^3
  - gokigen naname [380] http://www.janko.at/Raetsel/Gokigen/index.htm
    - tri-state as nurikabe: unfilled, backslash, slash
  - dominos [380] http://www.janko.at/Raetsel/Dominos/index.htm
    - beware of different board sizes with different bound on max number
      on a domino
  - magnete [150] http://www.janko.at/Raetsel/Magnete/index.htm
    - place plus/minus signs according to hints, two adjacent cells cannot
      contain same sign
  - shikaku [240] http://www.janko.at/Raetsel/Sikaku/index.htm
    - implement the controls in the following way: at the beginning, there
      will be 1x1 rectangles on top of every number. the size of a rectangle
      is changed by holding the mouse button an edge cell and moving the
      pointer in any direction. if the mouse is dragged out of the rectangle,
      the size increases by one in that direction. if the mouse is dragged
      inwards, the size decreases by one in that direction. mouse dragging
      routines are easily stolen from masyu.
    - how to show current size?
  - lampions [130] http://www.janko.at/Raetsel/Lampions/index.htm
    - a mix of minesweeper and akari, mark cells as black/white
  - tohu wa vohu [120] http://www.janko.at/Raetsel/Tohu-Wa-Vohu/index.htm
    - place T or V so that an equal number of each occur on each row/col
      and no ver/hor run of 3 similar symbols exist
  - grand tour [130] http://www.janko.at/Raetsel/Grand-Tour/index.htm
    - make a single loop through all dots, must use existing line segments
    - similar to slitherlink, steal routines from it
  - sternenhaufen [90] http://www.janko.at/Raetsel/Sternenhaufen/index.htm
    - place block and star in each row/column so that the moons are lit
      as indicated
  - corral [30] http://www.janko.at/Raetsel/Corral/index.htm
    - mark cells as empty or wall, a single closed loop must enclose the
      empty cells
  - mochikoro [50] http://www.janko.at/Raetsel/Mochikoro/index.htm
    - similar to nurikabe, only islands are diagonally connected
  - leuchttürme (lighthouse) [70] http://www.janko.at/Raetsel/Leuchttuerme/index.htm
    - place ships so that lighthouses are satisfied
  - mosaik [30] http://www.janko.at/Raetsel/Mosaik/index.htm
    - mark cells black/white, somewhat similar to minesweeper
  - norinori [30] http://www.janko.at/Raetsel/Norinori/index.htm
    - mark two cells in each region black so that the black regions form
      1x2 or 2x1 dominoes
  - linesweeper [40] http://www.janko.at/Raetsel/Linesweeper/index.htm
    - make a closed loop so that each number is adjacent to that many cells
      containing segments of the loop
    - steal routines from masyu
  - türen (doors) [20] http://www.janko.at/Raetsel/Tueren/index.htm
    - similar to kuromasu, steal edge routines from slitherlink
  - mauerbau [40] http://www.janko.at/Raetsel/Mauerbau/index.htm
    - place vertical/horizontal lines so that the numbered cells indicate
      the number of lines emanating from it. similar to corral and
      kuromasu
  - vier winde [30] http://www.janko.at/Raetsel/Vier-Winde/index.htm
    - similar to mauerbau
  - sternenhimmel [17] http://www.janko.at/Raetsel/Sternenhimmel/index.htm
    - place stars so that numbers and arrows are satisfied
  - tapa [70] http://www.janko.at/Raetsel/Tapa/index.htm
    - place black cells so that numbers are satisfied
  - trace numbers [36] http://www.janko.at/Raetsel/Trace-Numbers/index.htm
    - make several paths, each going through each number in increasing
      order, while leaving no cell empty
  - fillomino [330] http://www.janko.at/Raetsel/Fillomino/index.htm
    - suggested controls: drag number from numbered cell to non-numbered cell
      to populate cell with new value. weakness with this: impossible to
      directly enter the value of non-adjacent cells. also, click in cell
      (another button) to remove number. use thickness-routines from heyawake.
  - zeltlager (tents and trees) [430] http://www.janko.at/Raetsel/Zeltlager/index.htm
    - place tents so that each tent is close to a tree, each tent is assigned
      to exactly one tree and the number of tents in each row/col is as
      indicated
  - zeltlager^2 [230] http://www.janko.at/Raetsel/Zeltlager2/index.htm
    - mix between zeltlager and picross
  - nachbarn [50] http://www.janko.at/Raetsel/Nachbarn/index.htm
    - define regions between cells so that the numbers indicate the number of
      adjacent regions
  - pfeilzahlen [230] http://www.janko.at/Raetsel/Pfeilzahlen/index.htm
    - place arrows so that each number is pointed to by the indicated number
      of arrows
  - spotlight [110] http://www.janko.at/Raetsel/Spotlight/index.htm
    - mark arrows black or white
  - pillen [60] http://www.janko.at/Raetsel/Pillen/index.htm
    - place 1x3 or 3x1 white regions so that sum of black cells is
      satisfied
  - seek numbers [27] http://www.janko.at/Raetsel/Seek-Numbers/index.htm
    - create path from S to Z that goes through all cells, numbers indicate
      how many turns are done between this cell and the next number
  - shakashaka [60] http://www.janko.at/Raetsel/Shakashaka/index.htm
  - masyu^2 [143] http://www.janko.at/Raetsel/Masyu2/index.htm
    - same as masyu, but make path instead of loop, and path must pass through
      all cells and start/end at designated spots. also, more lax restrictions
      on black/white cells
  - ripple effect (hakyuu) [260] http://www.janko.at/Raetsel/Hakyuu/index.htm
    - how to do controls?
  - patchwork [210] http://www.janko.at/Raetsel/Patchwork/index.htm
    - mix of ripple effect and latin-ish square
  - battleships, bimaru [420] http://www.janko.at/Raetsel/Battleships/index.htm
    - remember to support the variant with ships shaped as arbitraty
      polyomonies! see motris for examples
    - both water and ship parts can be pre-specified
    - another variant: digital battleship where each ship part has a value
      and the clues indicate the sum
  - polyominos [23] http://www.janko.at/Raetsel/Polyominos/index.htm
    - make polyominos so that the sum of each cell in a polyomino is 10
    - minimize the number of unused cells (this requirement looks dubious,
      how to check this computationally?)
  - sternenschlacht (star battle) [40] http://www.janko.at/Raetsel/Sternenschlacht/index.htm
    - place one star in each region,row,column so that no two stars are
      8-adjacent
  - galaxien [250] http://www.janko.at/Raetsel/Galaxien/index.htm
    - make symmetrical blocks with dot in centroid
  - anglers [30] http://www.janko.at/Raetsel/Anglers/index.htm
  - burokku [100] http://www.janko.at/Raetsel/Burokku/index.htm
  - country road [30] http://www.janko.at/Raetsel/Country-Road/index.htm
  - doughnut [18] http://www.janko.at/Raetsel/Doughnut/index.htm
    - on a torus, create a path through all cells, through all numeric cells
      in increasing order
  - zahlenschlange [27] http://www.janko.at/Raetsel/Zahlenschlange/index.htm
    - make a path from upper left to lower right so that every number
      from 1 to MAX is passed exactly once
  - balance http://battleships.free.fr/ and http://www2.stetson.edu/~efriedma/weight/
    - place weights so that all thingy balances
  - ebony and ivory [130] http://www.janko.at/Raetsel/Ebony-Ivory/index.htm
    - similar to picross, except there's one numbered hint which indicates
      the longest sequence of consecutive black blocks
  - pentominos [100] http://www.janko.at/Raetsel/Pentominos/index.htm
    - place pentominoes in grid so that no pair of pentominoes are adjacent
      diagonally
  - haunted mirror maze [33] http://www.janko.at/Raetsel/Spukschloss/index.htm
    - place ghosts, vampires, zombies so that number of seen things are
      satisfied.
    - hard to implement because of special graphics
  - detective chess [90] http://www.janko.at/Raetsel/Detektivschach/index.htm
    - hard to create because of graphics and user interface
  - suraromu (slalom) [40] http://www.janko.at/Raetsel/Suraromu/index.htm
    - make closed loop that passes through gates according to rules
  - LITS [110] http://www.janko.at/Raetsel/LITS/index.htm
    - place tetrominoes according to some restrictions
  - zipline [35] http://www.janko.at/Raetsel/Zipline/index.htm
    - place numbers so that each blue number is equal to the sum of all
      neighbouring cells. similar to minesweeper where mines have
      values
  - eulero [150] http://www.janko.at/Raetsel/Eulero/index.htm
    - latin square thingy
  - nanbaboru [20] http://www.janko.at/Raetsel/Nanbaboru/index.htm
    - latin square variant
  - wolkenkratzer (skyscrapers) [270] http://www.janko.at/Raetsel/Wolkenkratzer/index.htm
    - place numbers (representing height) so that the indicated number of
      distinct skyscrapers can be seen from a given row/column
  - mathrax [100] http://www.janko.at/Raetsel/Mathrax/index.htm
    - make latin square of numbers so that arithmetic is satisfied
  - hidoku [130] http://www.janko.at/Raetsel/Hidoku/index.htm
    - place numbers in grid so that consecutive numbers are 8-connected
    - warning, diagonal edges, additional graphics code needed
  - pfeilpfad [170] http://www.janko.at/Raetsel/Pfeilpfad/index.htm
    - place numbers in grid so that arrows point to larger number
  - yakuso [30] http://www.janko.at/Raetsel/Yakuso/index.htm
    - place numbers in grid so that they sum up as desired, and so that
      each number n>0 occurs n times (0 can occur any number of times)
  - zehnergitter [250] http://www.janko.at/Raetsel/Zehnergitter/index.htm
    - place numbers 0-9 in each row so that sum is satisfied and no digit
      is 8-adjacent to the same digit
  - hashiwokakero^2 [46] http://www.janko.at/Raetsel/Hashi2/index.htm
    - substitution ciphered version of hashiwokakero, steal routines from it
  - kakuro [670]
  - sukrokuro [80] http://www.janko.at/Raetsel/Sukrokuro/index.htm
    - kakuro with additional constraints
  - straights (str8ts) [80] http://www.janko.at/Raetsel/Straights/index.htm
    - similar-ish to kakuro
  - karurasu (bokkusu) [380] http://www.janko.at/Raetsel/Kakurasu/index.htm
    - fill in black/white such that cells satisfy certain numerical rules
  - japanese sums [50] http://www.janko.at/Raetsel/Japanische-Summen/index.htm
    - similar-ish to kakuro
  - sudoku [810] (generalised size) + variants
    - samunamupure (killer-sudoku) http://www.janko.at/Raetsel/Samunamupure/index.htm
  - mastermind [98] http://www.janko.at/Raetsel/Mastermind/index.htm
  - kendoku (mathdoku, calcudoku) [230] http://www.janko.at/Raetsel/Kendoku/index.htm
    - fill in numbers so that the arithmetic is satisfied
  - miss lupun [110] http://www.janko.at/Raetsel/Miss-Lupun/index.htm
    - fill in numbers so that the arithmetic is satisfied
  - futoshiki [270] http://www.janko.at/Raetsel/Futoshiki/index.htm
    - fill in numbers so that inequalities are satisfied
  - rechengitter [30] http://www.janko.at/Raetsel/Rechengitter/index.htm
    - fill in numbers so that inequalities are satisfied
  - probably some more games

- add variations of games
  - !irakAkari! http://www.janko.at/Raetsel/Varianten/001.a.htm
    (should be easy to modify existing akari to support this)

GENERAL GOAL

make a client for playing nurikabe, heyawake, akari, slitherlink, yajilin,
hashiwokakero, masyu and possibly other fun puzzles. use sdl (maybe opengl)
for graphics.

features:
- automatic puzzle generation
- read puzzles from files supplied by user
- in-game hint function which uses a fabolous solver written by myself
  - the hint system has several levels: 
    - only show trivial hints (like surrounding the 1 in nurikabe,
      forced placement of light in akari, one possible way to fill in
      a rectangle independently of surrounding)
    - medium hints (like o | ? | o in heyawake, fill the ?)
    - deep hints (stuff requiring backtracking or advanced reasoning)
  - the solver should be able to solve every puzzle, ever
- in-game intervention of player moves: warn about wrong moves
  (can be turned off, or warn about trivial mistakes only, or warn also about
  deeper mistakes)

framework:
- make a general graphics engine with the following helper functionality:
  - given a screen resolution and grid size, scale appropriately
  - støtt følgende mouse events:
    - klikk i celle
    - dra fra celle til nabocelle
    - klikk på ikon over (som check, try, etc)
    - klikk på en kant mellom to celler (slitherlink)
  - støtt tastaturstyring:
    - cursor: flytt rundt
    - space: endre cell
    - shift+cursor: legge til/fjerne kant
    - cursormode for slitherlink: naviger langs kanter
  - støtte for full undo, som for hvert trekk lagrer hvilke grafiske endringer
    som skjer (dvs endret innhold i rute, endring i kanter som trekkes

documentation:
- for each game, write a nice article (html page?) showing:
  - the rules (with screenshots)
  - the heuristics used by the solver (demonstrated with screenshots),
    containing.
    - when to apply the heuristic
    - how to apply it (what cells to fill with what)
    - which rule we violate by filling out the cells in a wrong way
