Derive a algorithm to match best position

Posted by Farooq Arshed on Game Development See other posts from Game Development or by Farooq Arshed
Published on 2013-01-24T12:09:26Z Indexed on 2013/07/01 4:29 UTC
Read the original article Hit count: 429

Filed under:
|
|

I have pieces in my game which have stats and cost assigned to them and they can only be placed at a certain location.

Lets say I have 50 pieces.

e.g. Piece1 = 100 stats, 10 cost, Position A. Piece2 = 120 stats, 5 cost, Position B. Piece3 = 500 stats, 50 cost, Position C. Piece4 = 200 stats, 25 cost, Position A. and so on..

I have a board on which 12 pieces have to be allocated and have to remain inside the board cost. e.g. A board has A,B,C ... J,K,L positions and X Cost assigned to it.

I have to figure out a way to place best possible piece in the correct position and should remain within the cost specified by the board.

Any help would be appreciated.

© Game Development or respective owner

Related posts about math

Related posts about algorithm