ScratchData LogoScratchData
Back to gregatku's profile

Peg (marble) Solitaire

GRgregatku•Created January 14, 2023
Peg (marble) Solitaire
53
37
921 views
View on Scratch

Instructions

Peg (marble) Solitaire - Peg Solitaire (with marbles) Click the Flag to set up the Puzzle. Full instructions on screen. Mobile friendly! New "Undo last move" button (in top left corner). [Hide/Show Captures] to toggle animating Captures. (Cloud List) to toggle display of the "Solved by" List. (Reset) - to reset puzzle to original configuration. NOTE: If you are a Scratcher and logged in, and you manage to solve the Puzzle, provided you haven't "Seen inside", if you aren't already in the List, it will be recorded in the "Solved by" List Saved in the Cloud Variables Cloud-Data1/2/3/4/5/6/7 & 8. I have initialised them with those users already known to have solved it via the old "Solved" Cloud Variable, which can no longer be seen. The List will support up to 48 Scratchers in it Good Luck!

Description

Peg Solitaire is one of a few Games/Puzzles my grandmother introduced me to (Scrabble being another). I recently opened a storage box and found that the original puzzle she showed me some 60 years ago had been handed down to me. As soon as I had solved it, of course I had to make it in Scratch. I photographed the real puzzle to make the Game Board, but of course it had real black marbles. In the real puzzle when a marble is removed by jumping it, the removed marble is placed in the outer ring, but I got lazy in Scratch and just deleted the clone. However when adding the Undo button, I changed to hiding removed marbles rather than deleting them, making it much easier to bring them back if Undo is clicked. But thanks to @Ashi803's suggestion animating the captured marbles appearing in the outer ring (and disappearing on an Undo) was reasonably straightforward. They still don't roll around that ring until they settle as they would in real-life, but it's pretty realistic otherwise. But if you prefer not to see the captured marbles jumping out to (and in from on Undo) the outer ring, just click [Hide Captures]. Hope you have fun trying to solve it! By the way when solving it you need to be very systematic. You can't solve it if you leave any marble so isolated that it has no (orthogonally) adjacent marbles or so you are unable to move another marble adjacent to it, so it can still be moved. TIP: I'm sure there are several ways to solve it, but a tip for the way I've solved it, is: You need to get rid of at least 5 of the 6 marbles at the edge of the 4 cross edges first, and ensure you have none on the outermost line of the 4 cross edges. Good luck. The project does not count your moves, because there are 32 marbles, 31 of which have to be removed to solve the puzzle, one each move. So if you do manage to solve it, it will necessarily take you 31 moves. To make things a bit easier I added an "Undo last move" button, with which you can go all the way back to the start if you wish (but it would be easier just to click the Green Flag again in that instance). Thanks to @Ashi803, whose phone conversation with me helped me find & fix an occasional, but really annoying bug with my Undo code.

Project Details

Project ID788125791
CreatedJanuary 14, 2023
Last ModifiedMarch 16, 2024
SharedFebruary 3, 2023
Visibilityvisible
CommentsAllowed