lights_out
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
lights_out [2019/03/28 10:25] – created frchris | lights_out [2023/11/30 09:17] – frchris | ||
---|---|---|---|
Line 1: | Line 1: | ||
**Lights Out** | **Lights Out** | ||
- | {{https://mathorama.com/apcs/uploads/Main/lightsOut.png:}} | + | {{https://www.jaapsch.net/puzzles/images/lo2000.jpg}} |
+ | {{https://www.jaapsch.net/ | ||
+ | {{https:// | ||
+ | {{https:// | ||
+ | [[https:// | ||
- | !What to do | + | {{https:// |
- | Right now the code works so that a single clicked square is turned on or off as you click it. In the actual game, when you click on a light, it changes not only the light you clicked on, but also the one above, below and the one on the right and the left. You need to modify the @@Puzzle@@ method @@clickOn@@ so it will work properly. | ||
- | !What else? | ||
- | #Once you have that working, change the constructor of the @@Puzzle@@ so it randomly chooses to turn on several lights. | + | {{ :: |
- | #There is a version where there are no borders, so when you click on one of the lights on the edge, it changes the lights on the other side (Hint: use mod % ) | + | |
- | #change the dimensions. | + | **What to do** |
- | #count the moves | + | |
- | #not all random situations form a solvable puzzle. | + | - Right now the code works so that a single clicked square is turned on or off as you click it. In the actual game, when you click on a light, it changes not only the light you clicked on, but also the one above, below and the one on the right and the left. You need to modify the '' |
- | #keep score based on the minimum | + | - Once you have that working, change the constructor of the '' |
+ | - Notice it always says 0 moves. Look at the code in '' | ||
+ | - Change the dimensions of the puzzle. | ||
+ | - There is a version where there are no borders, so when you click on one of the lights on the edge, it changes the lights on the other side (Hint: use mod % ) | ||
+ | - Not all random | ||
+ | - Optional: Let the player know the minimum |
lights_out.txt · Last modified: 2023/11/30 09:21 by frchris