summaryrefslogtreecommitdiff
path: root/src/game.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game.c')
-rw-r--r--src/game.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/game.c b/src/game.c
index 0781d67..778859c 100644
--- a/src/game.c
+++ b/src/game.c
@@ -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);
}
}