News for hackers. Stuff that matters.
Re:Show HN: An Open Source Number Game by henrybaxter on Wednesday May 22, 2013 @10:33PM (#5755022)
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.

Re:Show HN: An Open Source Number Game by maxmcd on Wednesday May 22, 2013 @10:36PM (#5755032)
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?
Re:Show HN: An Open Source Number Game by zsch on Wednesday May 22, 2013 @10:38PM (#5755034)
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.
Re:Show HN: An Open Source Number Game by henrybaxter on Wednesday May 22, 2013 @10:49PM (#5755057)
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!
Re:Show HN: An Open Source Number Game by ncallaway on Thursday May 23, 2013 @12:12AM (#5755312)
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!

Re:Show HN: An Open Source Number Game by MindTwister on Thursday May 23, 2013 @01:35AM (#5755509)
That only works until you hit 21, thats a multiple of 3 and you lose.
Re:Show HN: An Open Source Number Game by cncool on Thursday May 23, 2013 @04:58AM (#5755880)
I hit three 7s and scored 21 points. Then four and got 28 points.
Re:Show HN: An Open Source Number Game by pyoung on Thursday May 23, 2013 @02:01AM (#5755559)
Looks like the cells are randomly populated, so my first attempt, I only had three '7's. I had a ton of '9's so I used the 10-10-9-9-9-9.... strategy to safely get me to a higher score, and then did a little math from there to hit each multiple of 7 on the way up.

Definitely a fun little distraction, I should be working though.

Re:Show HN: An Open Source Number Game by hayksaakian on Thursday May 23, 2013 @12:18AM (#5755325)
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

Re:Show HN: An Open Source Number Game by examancer on Wednesday May 22, 2013 @10:26PM (#5754997)
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.
Re:Show HN: An Open Source Number Game by Sealy on Wednesday May 22, 2013 @09:39PM (#5754856)
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.
Re:Show HN: An Open Source Number Game by zsch on Wednesday May 22, 2013 @09:42PM (#5754870)
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.
Re:Show HN: An Open Source Number Game by Sealy on Wednesday May 22, 2013 @10:20PM (#5754979)
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.
Re:Show HN: An Open Source Number Game by jstanley on Thursday May 23, 2013 @03:27AM (#5755705)
You could just display the smallest multiple of seven that hasn't been used yet.
Re:Show HN: An Open Source Number Game by deckar01 on Thursday May 23, 2013 @04:06AM (#5755773)
@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
Re:Show HN: An Open Source Number Game by AldousHaxley on Wednesday May 22, 2013 @09:49PM (#5754888)
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).
Re:Show HN: An Open Source Number Game by zsch on Wednesday May 22, 2013 @09:51PM (#5754896)
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.
Re:Show HN: An Open Source Number Game by andrew_gardener on Wednesday May 22, 2013 @10:39PM (#5755038)
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

Re:Show HN: An Open Source Number Game by ozh on Thursday May 23, 2013 @02:07AM (#5755572)
I confirm. Broken in Firefox.
Re:Show HN: An Open Source Number Game by MildlySerious on Thursday May 23, 2013 @07:17AM (#5756205)
Yep. The table needs a clear.
Re:Show HN: An Open Source Number Game by feniv on Thursday May 23, 2013 @01:49AM (#5755533)
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.
Re:Show HN: An Open Source Number Game by city41 on Wednesday May 22, 2013 @10:15PM (#5754960)
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.
Re:Show HN: An Open Source Number Game by zsch on Wednesday May 22, 2013 @10:18PM (#5754973)
I agree. Just updated.
Re:Show HN: An Open Source Number Game by mattmoss on Wednesday May 22, 2013 @09:25PM (#5754818)
"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.

Re:Show HN: An Open Source Number Game by zsch on Wednesday May 22, 2013 @09:28PM (#5754830)
Thank you for pointing that out. No it should be on a game by game basis. It should be fixed now.
Re:Show HN: An Open Source Number Game by thelostrobot on Thursday May 23, 2013 @04:17AM (#5755800)
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.
Re:Show HN: An Open Source Number Game by thelostrobot on Thursday May 23, 2013 @04:21AM (#5755807)
Also, why is sum=3 not a fail case?
Re:Show HN: An Open Source Number Game by deckar01 on Thursday May 23, 2013 @04:26AM (#5755820)
It is in his repo, it just isn't in the hosted version yet.
Re:Show HN: An Open Source Number Game by thelostrobot on Thursday May 23, 2013 @05:17AM (#5755919)
aah, okay
Re:Show HN: An Open Source Number Game by madlee on Wednesday May 22, 2013 @10:25PM (#5754993)
nice game. got up to 833 before I realized i'd been playing it way too long :)
Re:Show HN: An Open Source Number Game by thelostrobot on Thursday May 23, 2013 @05:17AM (#5755923)
Wats the max score that you have achieved? I am on 1470 and still playing
Re:Show HN: An Open Source Number Game by vbl on Wednesday May 22, 2013 @10:41PM (#5755045)
Really needs an indicator that tells you how many moves you have in a given turn, which goes down as you click.