// Both of these are +2 greater than play area due to boundary wall:
#ifndef NULL
#define NULL 0
#endif

#ifdef LINUX
#define IN_ROM 
#else
#define IN_ROM __attribute__ ((section(".text")))
#endif

// Problem is 9 across by 9 down (excluding boundaries) and needs 15 icons

// correction: 4, -3
const char const *game0[11] IN_ROM = {
  "   +-+     ",
  "  ++ | +--+",
  " ++  +-+  |",
  "++ $      |",
  "+   @$ #  |",
  "+-+ $###  |",
  "  |  #..  |",
  " ++ ##.# ++",
  " |      ++ ",
  " |     ++  ",
  " +-----+   "
};

// Problem is 7 across by 7 down (excluding boundaries) and needs 9 icons

const char const *game1[9] IN_ROM = {
  "    +---+",
  "   ++ . |",
  "  ++ $. |",
  " ++ $   |",
  "++ $@ +-+",
  "| $  ++  ",
  "|.. ++   ",
  "|   |    ",
  "+---+    "
};

// Problem is 14 across by 12 down (excluding boundaries) and needs 29 icons

const char const *game2[14] IN_ROM = {
  "           +---+",
  "          ++   |",
  "          |    |",
  "    +--+  | $ ++",
  "    |  +--+$ $| ",
  "    |     $ $ | ",
  "   ++ ## $ $ $| ",
  "   |  .#  $ $ | ",
  "   |  .#      | ",
  "+--+# ###+----+ ",
  "|.... @  |      ",
  "|....    |      ",
  "++  +----+      ",
  " +--+           "
};

// Problem is 11 across by 8 down (excluding boundaries) and needs 23 icons

const char const *game3[10] IN_ROM = {
  "  +---------+",
  "  |     #  @|",
  "  + $ $$#   |",
  "  ++$    $$ |",
  "   |  $ #   |",
  "+--+## #+---+",
  "|.. ..$ |    ",
  "| ..    |    ",
  "|  ..+--+    ",
  "+----+       "
};

// Problem is 9 across by 10 down (excluding boundaries) and needs 33 icons

const char const *game4[12] IN_ROM = {
  "+---------+",
  "|.  .$.  .|",
  "| $  $  $ |",
  "++ ..$.. ++",
  " ++$#$#$++ ",
  "  |.$ $.|  ",
  "  |  @  |  ",
  "  |## ##|  ",
  " ++ $ $ ++ ",
  " |.  $  .| ",
  " +-+ . +-+ ",
  "   +---+   "
};

// Problem is 11 across by 9 down (excluding boundaries) and needs 31 icons

const char const *game5[11] IN_ROM = {
  "    +-----+  ",
  "    |     ++ ",
  "+---+ ###  | ",
  "|       #  ++",
  "|@$***. ##$ +",
  "|  #    ## .+",
  "++  ##  # $ +",
  " ++  ####.$.+",
  "  ++        +",
  "   +----+  ++",
  "        +--+ "
};

// Problem is 7 across by 7 down (excluding boundaries) and needs 14 icons

const char const *game6[9] IN_ROM = {
  "+-------+",
  "|. .    |",
  "|.$. .  |",
  "++ ###@ |",
  " |  $  ++",
  " | $$ ++ ",
  " |  $ |  ",
  " |  +-+  ",
  " +--+    "
};

// Problem is 9 across by 7 down (excluding boundaries) and needs 18 icons

const char const *game7[9] IN_ROM = {
  "  +--+     ",
  "+-+  +--+  ",
  "|   @   |  ",
  "| #. .#.+-+",
  "| $$$ $$$ |",
  "+-+.#.#.# |",
  "  |       |",
  "  +--+  +-+",
  "     +--+  "
};

// Problem is 10 across by 12 down (excluding boundaries) and needs 38 icons

const char const *game8[14] IN_ROM = {
  "   +-----+  ",
  " +-+     ++ ",
  " |   ###  | ",
  " |      # | ",
  "++#$#@  # | ",
  "|   ##### | ",
  "|   #  *. | ",
  "++$$#  *.#| ",
  " |     *..| ",
  " +--+ #...++",
  "    | #$$$ |",
  "    |   $  |",
  "    +---+  |",
  "        +--+"
};

// Problem is 8 across by 6 down (excluding boundaries) and needs 16 icons

const char const *game9[8] IN_ROM = {
  " +-----+  ",
  "++     |  ",
  "|  *.$.|  ",
  "|  *.#.+-+",
  "| #$@$$  |",
  "|   ++ # |",
  "+---+|   |",
  "     +---+"
};

// Problem is 7 across by 9 down (excluding boundaries) and needs 15 icons

const char const *game10[11] IN_ROM = {
  "   +--+  ",
  "   |@ |  ",
  "  ++  |  ",
  "  | .$|  ",
  "  |$. |  ",
  "+-+..$+-+",
  "|  ..$  |",
  "| $ $ # |",
  "+---+ # |",
  "    |   |",
  "    +---+"
};

// Problem is 7 across by 6 down (excluding boundaries) and needs 19 icons

const char const *game11[8] IN_ROM = {
  "     +--+",
  "     |  |",
  "+----+$.|",
  "|   $ $.|",
  "| $@$...|",
  "| $$$..++",
  "|  $ ..| ",
  "+------+ "
};

// Problem is 13 across by 4 down (excluding boundaries) and needs 19 icons

const char const *game12[6] IN_ROM = {
  "+---+ +------+ ",
  "|   +-+ . $  | ",
  "|   $ *.. #$ ++",
  "++ $# ..* $  @|",
  " |  $ . +-+   |",
  " +------+ +---+"
};

const char const *testgame16x16[18] IN_ROM = {
  "+----------------+",
  "|$              .|",
  "|                |",
  "|                |",
  "|                |",
  "|                |",
  "|                |",
  "|                |",
  "|      #    #    |",
  "|                |",
  "|                |",
  "|                |",
  "|                |",
  "|                |",
  "|                |",
  "|                |",
  "|@              #|",
  "+----------------+"
};

const char const *testgame8x8[10] IN_ROM = {
  "+--------+", // row 0
  "|########|", // row 1
  "|  ######|", // etc...
  "|   #    |",
  "|#### $$$|",
  "|        |",
  "|    #   |",
  "| @   ...|",
  "|    #   |",
  "+--------+"
};


#define NUM_GAMES 14
const char const * const *game[NUM_GAMES+1] IN_ROM = {
  game0,
  game1,
  game2,
  game3,
  game4,
  game5,
  game6,
  game7,
  game8,
  game9,
  game10,
  game11,
  game12,
  testgame8x8
};

const uint8 game_height[] = {11,9,14,10,12,11,9,9,14,8,11,8,6,
                             8+2};

