I'm making a cards game in python language.
I need a formula to zooming the cards in screen.
I put the following formula by now:
zoom=(NumberOfCards*0.042857)
This formula get a zoom factor of 0.3 for Number=7. This is the standard for the first hand. Now the number of cards can increase of decrease and the hand should fit into screen accordingly.
Now I want to improve the formula to:
- If Number<7 -> Keep the zoom the same (because cards can fit in screen)
- If Number from 7 to 54 decrease the zoom slightly (or even keep to 0.3 til a higher number because could fit in screen).
The screen is 1280x720. The 54 cards are saved 600x868 in png format (zoomed to 0.3 factor: 180x260.4 overlapped as you can see in the capture)
How should be the formula? I'm weak at maths, hahaha.
Thanks in advance. :-)