diff options
author | BoredGuy <osome3717@gmail.com> | 2025-07-05 08:41:11 -0700 |
---|---|---|
committer | BoredGuy <osome3717@gmail.com> | 2025-07-05 08:41:11 -0700 |
commit | 28629e090b93438ca4e6b11e30fc3d2122fa6476 (patch) | |
tree | 2576599ed1bd2c66985257f17c23a78c7befa034 | |
parent | 1798a1ac7ced167abae55a8d4e64e59bb524a05e (diff) |
For Resetting
-rw-r--r-- | src/game.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -60,7 +60,7 @@ int main(void) { srand((unsigned int)time(NULL)); LoadAssets(); - InitGame(3); + InitGame(2); while(!WindowShouldClose()) { UpdateGame(GetFrameTime()); @@ -181,13 +181,13 @@ void UpdateCard(Card* c, float dt) { } static inline float HandWidth(int hand) { - return game.cardsInHand[hand] * CARD_WIDTH; + return (float)game.cardsInHand[hand] * CARD_WIDTH; } //Moves all the cards in the hand indexed to their correct positions void PositionCardsInHand(int hand) { float centerXpos = - (WINDOW_WIDTH - HandWidth(hand)) / 2.0; + (WINDOW_WIDTH - HandWidth(hand)) / 2.0f; float positionsX[] = { game.playerCount < 3 ? centerXpos : 0.0f, @@ -333,10 +333,10 @@ void HandleMousePress() { } MoveToStack(game.hands[game.turn], - i, - &game.cardsInHand[game.turn], - 0.5 - ); + i, + &game.cardsInHand[game.turn], + 0.5 + ); PositionCardsInHand(game.turn); } } |