User:Sinthorion/Lights Out

This is version 2.0 of my Lights Out game coded in wikicode. Lights Out is a classical puzzle game. If you click on one field, it will toggle it and all four neighbours. The goal is to make all fields green.

You can play around and try to generate interesting patterns or you can click on the button below to generate a random pattern to solve. I don't know if all random patterns are solvable. The solution generator helps you to find back to the default state but it is deactivated after applying a random pattern.

 ⬛ ⬛  ⬛ ⬛   ⬛ ⬛   ⬛ ⬛   ⬛ ⬛   ⬛ ⬛    ⬛ ⬛   ⬛ ⬛   ⬛ ⬛   ⬛ ⬛   ⬛ ⬛   ⬛ ⬛    ⬛ ⬛   ⬛ ⬛   ⬛ ⬛   ⬛ ⬛  <span class="mw-customtoggle-solution-x5y3 mw-customtoggle-congrats-x5y3 mw-customtoggle-x5y3 mw-customtoggle-x4y3 mw-customtoggle-x6y3 mw-customtoggle-x5y2 mw-customtoggle-x5y4"> ⬛ ⬛  <span class="mw-customtoggle-solution-x6y3 mw-customtoggle-congrats-x6y3 mw-customtoggle-x6y3 mw-customtoggle-x5y3 mw-customtoggle-x6y2 mw-customtoggle-x6y4"> ⬛ ⬛   <span class="mw-customtoggle-solution-x1y4 mw-customtoggle-congrats-x1y4 mw-customtoggle-x1y4 mw-customtoggle-x2y4 mw-customtoggle-x1y3 mw-customtoggle-x1y5"> ⬛ ⬛  <span class="mw-customtoggle-solution-x2y4 mw-customtoggle-congrats-x2y4 mw-customtoggle-x2y4 mw-customtoggle-x1y4 mw-customtoggle-x3y4 mw-customtoggle-x2y3 mw-customtoggle-x2y5"> ⬛ ⬛  <span class="mw-customtoggle-solution-x3y4 mw-customtoggle-congrats-x3y4 mw-customtoggle-x3y4 mw-customtoggle-x2y4 mw-customtoggle-x4y4 mw-customtoggle-x3y3 mw-customtoggle-x3y5"> ⬛ ⬛  <span class="mw-customtoggle-solution-x4y4 mw-customtoggle-congrats-x4y4 mw-customtoggle-x4y4 mw-customtoggle-x3y4 mw-customtoggle-x5y4 mw-customtoggle-x4y3 mw-customtoggle-x4y5"> ⬛ ⬛  <span class="mw-customtoggle-solution-x5y4 mw-customtoggle-congrats-x5y4 mw-customtoggle-x5y4 mw-customtoggle-x4y4 mw-customtoggle-x6y4 mw-customtoggle-x5y3 mw-customtoggle-x5y5"> ⬛ ⬛  <span class="mw-customtoggle-solution-x6y4 mw-customtoggle-congrats-x6y4 mw-customtoggle-x6y4 mw-customtoggle-x5y4 mw-customtoggle-x6y3 mw-customtoggle-x6y5"> ⬛ ⬛   <span class="mw-customtoggle-solution-x1y5 mw-customtoggle-congrats-x1y5 mw-customtoggle-x1y5 mw-customtoggle-x2y5 mw-customtoggle-x1y4 mw-customtoggle-x1y6"> ⬛ ⬛  <span class="mw-customtoggle-solution-x2y5 mw-customtoggle-congrats-x2y5 mw-customtoggle-x2y5 mw-customtoggle-x1y5 mw-customtoggle-x3y5 mw-customtoggle-x2y4 mw-customtoggle-x2y6"> ⬛ ⬛  <span class="mw-customtoggle-solution-x3y5 mw-customtoggle-congrats-x3y5 mw-customtoggle-x3y5 mw-customtoggle-x2y5 mw-customtoggle-x4y5 mw-customtoggle-x3y4 mw-customtoggle-x3y6"> ⬛ ⬛  <span class="mw-customtoggle-solution-x4y5 mw-customtoggle-congrats-x4y5 mw-customtoggle-x4y5 mw-customtoggle-x3y5 mw-customtoggle-x5y5 mw-customtoggle-x4y4 mw-customtoggle-x4y6"> ⬛ ⬛  <span class="mw-customtoggle-solution-x5y5 mw-customtoggle-congrats-x5y5 mw-customtoggle-x5y5 mw-customtoggle-x4y5 mw-customtoggle-x6y5 mw-customtoggle-x5y4 mw-customtoggle-x5y6"> ⬛ ⬛  <span class="mw-customtoggle-solution-x6y5 mw-customtoggle-congrats-x6y5 mw-customtoggle-x6y5 mw-customtoggle-x5y5 mw-customtoggle-x6y4 mw-customtoggle-x6y6"> ⬛ ⬛   <span class="mw-customtoggle-solution-x1y6 mw-customtoggle-congrats-x1y6 mw-customtoggle-x1y6 mw-customtoggle-x2y6 mw-customtoggle-x1y5"> ⬛ ⬛  <span class="mw-customtoggle-solution-x2y6 mw-customtoggle-congrats-x2y6 mw-customtoggle-x2y6 mw-customtoggle-x1y6 mw-customtoggle-x3y6 mw-customtoggle-x2y5"> ⬛ ⬛  <span class="mw-customtoggle-solution-x3y6 mw-customtoggle-congrats-x3y6 mw-customtoggle-x3y6 mw-customtoggle-x2y6 mw-customtoggle-x4y6 mw-customtoggle-x3y5"> ⬛ ⬛  <span class="mw-customtoggle-solution-x4y6 mw-customtoggle-congrats-x4y6 mw-customtoggle-x4y6 mw-customtoggle-x3y6 mw-customtoggle-x5y6 mw-customtoggle-x4y5"> ⬛ ⬛  <span class="mw-customtoggle-solution-x5y6 mw-customtoggle-congrats-x5y6 mw-customtoggle-x5y6 mw-customtoggle-x4y6 mw-customtoggle-x6y6 mw-customtoggle-x5y5"> ⬛ ⬛  <span class="mw-customtoggle-solution-x6y6 mw-customtoggle-congrats-x6y6 mw-customtoggle-x6y6 mw-customtoggle-x5y6 mw-customtoggle-x6y5"> ⬛ ⬛    Click here to see the solution. Click here to hide the solution. To solve the game, click on all fields marked red in the solution. ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛  ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛  ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛  ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛  ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛ ⬛                                        Congratulations, you solved the game!                                     <div id="mw-customcollapsible-pattern" class="mw-collapsible mw-customtoggle-pattern mw-customtoggle-started mw-customtoggle-solution-hidden    mw-customtoggle-x1y1 mw-customtoggle-congrats-x1y1      mw-customtoggle-x2y1 mw-customtoggle-congrats-x2y1      mw-customtoggle-x3y1 mw-customtoggle-congrats-x3y1      mw-customtoggle-x4y1 mw-customtoggle-congrats-x4y1      mw-customtoggle-x5y1 mw-customtoggle-congrats-x5y1      mw-customtoggle-x6y1 mw-customtoggle-congrats-x6y1      mw-customtoggle-x1y2 mw-customtoggle-congrats-x1y2      mw-customtoggle-x2y2 mw-customtoggle-congrats-x2y2      mw-customtoggle-x3y2 mw-customtoggle-congrats-x3y2      mw-customtoggle-x4y2 mw-customtoggle-congrats-x4y2      mw-customtoggle-x5y2 mw-customtoggle-congrats-x5y2      mw-customtoggle-x6y2 mw-customtoggle-congrats-x6y2      mw-customtoggle-x1y3 mw-customtoggle-congrats-x1y3      mw-customtoggle-x2y3 mw-customtoggle-congrats-x2y3      mw-customtoggle-x3y3 mw-customtoggle-congrats-x3y3      mw-customtoggle-x4y3 mw-customtoggle-congrats-x4y3      mw-customtoggle-x5y3 mw-customtoggle-congrats-x5y3      mw-customtoggle-x6y3 mw-customtoggle-congrats-x6y3      mw-customtoggle-x1y4 mw-customtoggle-congrats-x1y4      mw-customtoggle-x2y4 mw-customtoggle-congrats-x2y4      mw-customtoggle-x3y4 mw-customtoggle-congrats-x3y4      mw-customtoggle-x4y4 mw-customtoggle-congrats-x4y4      mw-customtoggle-x5y4 mw-customtoggle-congrats-x5y4      mw-customtoggle-x6y4 mw-customtoggle-congrats-x6y4      mw-customtoggle-x1y5 mw-customtoggle-congrats-x1y5      mw-customtoggle-x2y5 mw-customtoggle-congrats-x2y5      mw-customtoggle-x3y5 mw-customtoggle-congrats-x3y5      mw-customtoggle-x4y5 mw-customtoggle-congrats-x4y5      mw-customtoggle-x5y5 mw-customtoggle-congrats-x5y5      mw-customtoggle-x6y5 mw-customtoggle-congrats-x6y5      mw-customtoggle-x1y6 mw-customtoggle-congrats-x1y6      mw-customtoggle-x2y6 mw-customtoggle-congrats-x2y6      mw-customtoggle-x3y6 mw-customtoggle-congrats-x3y6      mw-customtoggle-x4y6 mw-customtoggle-congrats-x4y6      mw-customtoggle-x5y6 mw-customtoggle-congrats-x5y6      mw-customtoggle-x6y6 mw-customtoggle-congrats-x6y6  ">Click here to apply a random pattern (You can't use the solution after generating a random pattern) Click here to reload the page to generate a new pattern

Some interesting facts:
 * The whole wikicode for the game is 28663 characters long.
 * I did not write all of it myself. The code was generated using a ruby script. The ruby script is 2832 characters long.
 * I'm not good in this game myself.
 * For those who know about, this game uses 77 custom collapsible classes.