-5

can somebody please give suggestions for sorting algorithms that works by manually sorting items? In our game, wehave the segregAtion part where the player manually drag-and-drops the trash to the trash bins. There are two bins, the biodegradable and non bio. When the trash is dropped to a correct bin classification, the player earns points. If not, no points are earned.

We used to have the bucket algorithm for sorting trash but our prof said it is not applicable bcoz bucket works by AUTOMATICALLY sorting trash. In our game, the player is the one sorting it. Does anyone know here if bucket sorting can be applied when manually sorting??

Thanks!

  • 4
    If this is related to code - I doubt it? - you really need to show us what you already have, what you tried, and what doesn't work. Right now, I'm confused what you're talking about. – C-Otto Aug 18 '16 at 11:29
  • 2
    Can you please give a specific example? It is unclear where your problem is. – CloudPotato Aug 18 '16 at 11:35
  • Have seen a similar question a few months back. Not sure if it was the same user...or the question is still there – vish4071 Aug 18 '16 at 11:36

1 Answers1

1

The description of the problem does not require a solution based on a bucket sort algorithm. You discuss that the player himself decides where he wants to place the trash, so clearly there is no need to sort the trash items by means of an algorithm. All you need to do is set some property to a piece of trash which holds information about in what trash bin it's supposed to end up in. Then when the player drops the trash in a bin, you award points to him if that bin is the same bin that is specified in the trash' property.

Glubus
  • 2,819
  • 1
  • 12
  • 26
  • Thanks for the answer @Glubus . Now im worried where to apply the bucket sort in the game. The algorithm is required in the system since we included it in the recommendations. We thought it would work with the segregation . you have any idea how to apply it in the segregtion part? That would be a great help! – Marianne Aug 18 '16 at 12:08
  • Well, you should probably change your recommendation then. I'm not sure my helping you to find away around your having to implement bucketsort for your assignment is something that belongs on this forum. HOWEVER, if I were you I'd create some sort of autocomplete function that exists as an "extra feature". You can implement a bucketsort algorithm as a means of calculating which piece of trash belongs to which bin (bucket). Since there's 2 buckets, and the entropy is binary, you can hardly consider this sorting though, but I guess if you just say it with a lot of confidence, you convince teach. – Glubus Aug 18 '16 at 13:14
  • @Marianne maybe it could be applied for some sort of score computation you know how many of each type of trash was generated so bucket sort creates an ideal output of the players outcome ... so you can compare it with it ... of coarse this is silly and backwards in comparison to direct score cumulation. – Spektre Aug 18 '16 at 16:10