To calculate the x, y positions of symbols on playing cards, you can follow the algorithm below. Note that this algorithm assumes that the card's width and height are given, and that the symbols are evenly distributed.
This algorithm calculates the positions of the symbols based on the card dimensions and the number of symbols. It first calculates the available width and height for symbols after accounting for padding. Then, it determines the number of rows and columns needed to distribute the symbols evenly. The positions of the symbols are calculated using the row and column spacing and added to an array.
You can adjust the padding value to change the distance between the symbols and the card edges.