thunderrabbit / robdot_conswi

A swipe game for Godot
1 stars 1 forks source link

Add ability to win levels #22

Closed thunderrabbit closed 6 years ago

thunderrabbit commented 6 years ago

Basically

  1. Add level_requirements Dictionary to level definition e.g.{"square":2, "ta3":1, "bo3":1}
  2. When pieces are collected, compare to this dictionary
  3. When a piece name matches dictionary key, decrement its required quantity
  4. When piece required quantity reaches 0, remove that key from dictionary
  5. Win when dictionary is empty