Release

Money Masher

5

was8bit 2021-08-17 20:18 (Edited)

Welcome to Money Masher... a Solitaire Puzzler game...

Oops... the money pots have been spilled... each one belongs to someone different, and had a specific amount of money in them... the original amounts for each are shown at the very top of the screen...

You must sort out the money and get each money pot back to its original amount... the current amount you sorted into each pot is shown on the top of the pot...

Good luck!

(Fixed bug, many thanks to Dan for the help :) )

Money Masher.nx | Open in app
2021-08-17 20:18

Timo 2021-08-18 20:04

There was not enough money to refill them... or I got it wrong??


was8bit 2021-08-19 06:41

At the start, there is 9x3 (27) bits of money on the bottom floor... and 9x3 (27) total spaces to be filled on the jars...

... so, all 27 pieces of money will totally fill up all 27 jars...


was8bit 2021-08-19 06:50

Now, the indiviual TOTAL of any one jar can usually be reached in different combinations of money... the trick is to figure out how to rearrange the money so all 3 jar totals are precisely reached...

... at the start of the game, each of the 27 money pieces (sprites 1 to 27) are assigned a specific money value, and by looking at the code...

IF I<=9 THEN
ADD GOAL(1),VALMONEY(I)
ELSE IF I>=19 THEN
ADD GOAL(3),VALMONEY(I)
ELSE
ADD GOAL(2),VALMONEY(I)
END IF

You will see that sprite money 1-9 are added up for pot 1, 10-17 are added up for pot 2, and 18-27 are added up for pot 3...

Then this code...

FOR I=1 TO 27
P0=0
P1=99
WHILE P0=0 OR P1<>0
X=RND(19)
Y=RND(5)+10
P0=POINTS(X,Y)
P1=BOARD(X,Y)
WEND
...(etc)

Looks for a random empty spot to place all 27 sprite money pieces....

... so unless you could see the sprite#, you wont know which sprite on the floor goes to which pot....


was8bit 2021-08-19 06:54 (Edited)

There IS a rare bug, where sometimes when you place a money in a pot, it doesnt add up for some reason... if you watch the pot total when you add a money, you can catch the bug because the total will not change...

.. the easy fix is to remove the money back to the floor, and put it back into the jar...

... if this bug occurs more than rarely i can try to find it, but out of testing the game about 50 times, i only had it happen to me once..


Dan 2021-08-19 21:30 (Edited)

If you want to get that bug, here is how:
https://streamable.com/a4v0xv

It happens when you set the money Sprite over another.


was8bit 2021-08-20 05:37 (Edited)

@ Dan... Ah.... thanks SOOO much.... that saves me a ton of time, especially with my ever tired brains ;) thank you :D

and the clip was very helpfull, thanky kindly :)


was8bit 2021-08-20 06:01 (Edited)

FIXED :)

So I use a POINT array created by a point background that my code read and store the points that a sprite can be played to... the BOARD array keeps track of sprite#'s played at a point...

When you pick up a sprite, i clear the value for the old location in the BOARD array because you picked up that sprite and are moving it...

I neglected to re-add the sprite# to the board array if you try to drop a sprite where it cannnot be played, and so is returned to where you picked it up from.... this lets the next sprite think there isnt anything played at that point...

My added code fixed it perfectly, thank you :)

P0=POINTS(BX,BY)
P1=BOARD(BX,BY)
IF P0=1 AND P1=0 THEN
SPRITE HIT,BX*8,BY*8,
BOARD(BX,BY)=HIT
IF VALMONEY(HIT)>=1 THEN PLAY 0,20,1 ELSE PLAY 0,90,1
GOSUB CALCULATE
ELSE
SPRITE HIT,OLDX*8,OLDY*8,
BOARD(OLDX,OLDY)=HIT ..... added this to fix
END IF


was8bit 2021-08-20 06:04

I like the idea of a POINT array that stores what points a sprite can be played to... along with the BOARD array that tracks what has been actually played... this might be useful in a card game ;)


G-9 2021-08-20 23:32

Whoa that’s a cool math game !
I love it :)


was8bit 2021-08-21 04:04

Thanks :) I enjoy playing it... it isnt too hard like sudoku can be... it is a good balance between a challenge and a soft solitaire experience :)


Log in to reply.