6 ms·
Show HN: An Open Source Number Game
- mattmoss 13y ago"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 13y agoThank you for pointing that out. No it should be on a game by game basis. It should be fixed now.
- Sealy 13y agoThat 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 13y agoThat'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.
- AldousHaxley 13y agoThis 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 13y agoThat 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.
- city41 13y agoThis 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 13y agoI agree. Just updated.
- madlee 13y agonice game. got up to 833 before I realized i'd been playing it way too long :)
- examancer 13y agoDecent 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.
- henrybaxter 13y agoGetting 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 13y agoThe 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 13y agoThat'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 13y agoI 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!
- andrew_gardener 13y agoThe 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 13y agoI confirm. Broken in Firefox.
- MildlySerious 13y agoYep. The table needs a clear.
- vbl 13y agoReally needs an indicator that tells you how many moves you have in a given turn, which goes down as you click.
- ncallaway 13y agoI 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 13y agoThat only works until you hit 21, thats a multiple of 3 and you lose.
- cncool 13y agoI hit three 7s and scored 21 points. Then four and got 28 points.
- pyoung 13y agoLooks 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.
- hayksaakian 13y agoI 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
- cpsales 13y agoi clicked to 28 and it not accept it as ok or wrong?
- feniv 13y agoYou 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.
- deckar01 13y ago@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 https://github.com/deckar01/mod7/tree/refactor and https://github.com/deckar01/mod7/tree/penalty-fives https://github.com/deckar01/mod7/tree/penalty-fives
- thelostrobot 13y agoNice 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 13y agoAlso, why is sum=3 not a fail case?
- deckar01 13y agoIt is in his repo, it just isn't in the hosted version yet.
- thelostrobot 13y agoaah, okay
- thelostrobot 13y agoWats the max score that you have achieved? I am on 1470 and still playing