

Show HN: An Open Source Number Game - zsch
http://zachschnell.com/mod7/

======
henrybaxter
Getting a sum of 21 the first time gets you a score, and the second time
(since you've already used that sum) it gets you a loss. I think it should
make you lose the first time!

Also, cool game thanks for sharing.

~~~
maxmcd
The rules seem to be that it checks if it's an available multiple of 7 first
and then if it's invalid. I initially thought the rules would work the way you
have described, but if that was the case, would all multiples of 7 and 3 be
off limits?

~~~
zsch
That's how it initially was. But I have now made it so that, as you say, it
first checks to see if it's a multiple of 7. If it's a multiple of both 7 and
3 (regardless of whether or not you have played it before), then you will no
longer be penalized.

~~~
henrybaxter
I think I understand why you decided to do that, but it might be worth an
explanation modification. I tested my understanding of the rules by trying 21,
and was surprised. Not that it's a big deal!

------
ncallaway
I would recommend removing "7" from the board at all. The easiest opening move
is to just start clicking all the 7s (since that guarantees you all multiples
of 7 until you run out of 7s).

This strategy requires 0-thinking and is a bit tedious. If the board has no
7's on it, you're required to add from the get-go.

EDIT: Also, very fun little game. Thanks for sharing!

~~~
MindTwister
That only works until you hit 21, thats a multiple of 3 and you lose.

~~~
cncool
I hit three 7s and scored 21 points. Then four and got 28 points.

------
hayksaakian
I need some social validation here, I could be at this all day, but unless I
know that I was better than somebody else it feels like a waste of time.

not /s

------
examancer
Decent game. How is this HTML5 though? The gameplay happens within an HTML
table and some simple javascript to turns that table into an interactive game.
Seems like something that could have been done with HTML 1.

------
Sealy
That is pretty cool. It would be handy if I can see the multiples of 7 that I
have used already. That way I can figure out what to work towards next.

~~~
zsch
That's a great idea! The trick will be finding a place to display it. Maybe
I'll add a button next to the score, and clicking it will reveal an overlay
with played numbers.

~~~
Sealy
A button would be good, but it would be even better if it showed up as soon as
you played it. It would reduce the number of unnecessary clicks then and
become more intuitive to play.

------
deckar01
@zsch I refactored your code using OOP and the factory design pattern. In this
form it is much easier to alter the logic of the game.
<https://github.com/deckar01/mod7/tree/refactor> and
<https://github.com/deckar01/mod7/tree/penalty-fives>

------
AldousHaxley
This is fantastic. My only suggestion would be a stronger visual indication of
when something gets added to the sum or the score. It probably sounds
cosmetic, but visual feedback is helpful for reinforcing text explanations (at
least for me, being a more hands-on learner).

~~~
zsch
That makes complete sense. I originally considered making a small noise when
the sum was added to the score, though I'm leaning more towards flashing the
updated score with a different color. Thank you for the feedback.

------
andrew_gardener
The grid doesn't appear properly in Firefox for me. clear your floats in the
scoreboard.

Other than that, looks pretty cool.

EDIT: actually it also seems to not work in Firefox in general after
refreshing the page

~~~
ozh
I confirm. Broken in Firefox.

~~~
MildlySerious
Yep. The table needs a clear.

------
feniv
You should polish this up and release it on the app store! It has that perfect
mix of fun and challenge to keep you entertained when you're waiting for
something and its conveniently easy to pick up and play also.

------
city41
This game is really great. My only complaint is it doesn't make sense that
clicking 7 doesn't net you any points, but clicking 3 loses you the game. I'd
say 7 should count as a score.

~~~
zsch
I agree. Just updated.

------
mattmoss
"You can only get credit for each multiple of 7 once…"

That carries across games; should it?

(Using Chrome 26.0.1410.65)

EDIT: I looked at the source; you do not reset sumslist.

~~~
zsch
Thank you for pointing that out. No it should be on a game by game basis. It
should be fixed now.

------
thelostrobot
Nice game. I would suggest a "subtraction" option. If you click on a number
and the sum is neither a multiple of 7 or 3, then how bout you allow the user
to click on a selected number again to deselect it and subtract its value from
the sum.

~~~
thelostrobot
Also, why is sum=3 not a fail case?

~~~
deckar01
It is in his repo, it just isn't in the hosted version yet.

~~~
thelostrobot
aah, okay

------
madlee
nice game. got up to 833 before I realized i'd been playing it way too long :)

------
thelostrobot
Wats the max score that you have achieved? I am on 1470 and still playing

------
vbl
Really needs an indicator that tells you how many moves you have in a given
turn, which goes down as you click.

