#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

# simple counting app

Posts: 95Member
Hi I am just a beginner and working on my first app, on the gamesalad win7 ver

hi, i am working on a counting app, which is pretty straight forward
tag low= a k " " " etc
tag high= 5 6" " "
tag neutral = 7 8 "
i need to set these accordingly and set scores when selected ie: lows =-1 highs= +1 and neutral = 0

I have created a integer called scores and added a -1 +1 to each of the numbers selected value to calculate.

• Posts: 95Member
I need a bit of help, any help would be appreciated. cheers
• London, UK.Posts: 12,822Member
edited February 2014
Your question (is it a question ?) doesn't make much sense, to me at least.

Maybe you could make it a little clearer, try stick to standard terms, for instance use 'attribute' instead of 'integer' - and lines like this: ". . . added a -1 +1 to each of the numbers selected value to calculate . . ." are very confusing, it's difficult to work out quite what it means.
• Posts: 95Member
sorry, I am only new at this, what i want to do is, i want an app which will keep count of numbers with in the highs, lows, and neutral, when selected, either by keyboard or touch screen, say for example a 10 card came out of the shoot, then i will select 10, and it would add as a -1 and if a 2 card came out of the shoot it would become +1, you can see the pattern.

I have so far created all the numbers , so all i want is when i hit that particular card or number it would calculate accordingly either -1 or +1 or 0 and keep the score
cheers
• Posts: 130Member, PRO
Here is a basic template of the blackjack card counting. Hope it helps

https://dl.dropboxusercontent.com/u/9241215/BlackJack Card Counting.zip
• Posts: 130Member, PRO
Basically, you can create an integer attribute. If the card is ace, k, j, q or 10, change that integer value to -1. If 2,3,4,5,6 change it to 1. If 7, 8, 9, change it to 0.

And when you hit, change count attribute to count + that integer.
• Posts: 95Member
many thanx
• Posts: 95Member
i have it working, however the count is not accurate, i have a change attribute, game.count to game.count-1 and -2 and 0 the -1 if touched once is ok, if i touch it more times it multiplys ie: -1 -3 -6 etc and the same pattern with the +1
the structure works ok just the counting, i need a bit of help with. cheers
• Posts: 9,914Member
Post an image of your code.
• Posts: 95Member
• Posts: 11,906Member, Sous Chef, PRO, Senior Sous-Chef
edited February 2014

So you want to subtract one from the count when a high card is clicked/tapped, add one when a low card is clicked, and make no change when a neutral card is clicked?

New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

• Posts: 11,906Member, Sous Chef, PRO, Senior Sous-Chef
I would use a text attribute for each category of card. So game.high = '10JKQA' and game.low = '23456' and game.neutral = '789'. Then, when a card is clicked, you would have a rule that says:

When game.high contains self.Name (or self.Image or however you are keeping track of the card value)
change attribute game.count to game.count-1
Otherwise
When game.low contains self.Name
change attribute game.count to game.count+1

New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

• Posts: 95Member
hi, thanx, i have tried your advice, would i need to spawn? or how will it acknowledge
the pressed rule in do?