playMaker

Author Topic: Counting Score  (Read 1392 times)

jgalvezpa

  • Junior Playmaker
  • **
  • Posts: 58
Counting Score
« on: November 06, 2013, 12:58:26 AM »
Hello  im able to count how many balloons in total i connect and destroy,
now i want to count how many balloons from each color, for example to know how many Blue Balloons i destroy, need help with the logic.
Thanks

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Counting Score
« Reply #1 on: November 06, 2013, 01:08:36 AM »
Hi,

 Using ArrayMaker, maintain a HashTable of ballons colors vs ints

"Blue": 2
"Red": 5
"green":0

 and everytime a ballon is hit, get the current value for that color, increment it by one and add it back.

 Does that make sense?

bye,

 Jean