レポジトリ種類: Mercurial

#ifndef PLAYER_H
#define PLAYER_H

#include <SDL2/SDL.h>
#include <iostream>

#include "render.hh"

class Player {
  public:
    SDL_Rect player, lives;

    int score = 0;
    int scoreMultiplier = 1;
    int livesCount = 3;

    Player(Render& r) {
      player.h = 12;
      player.y = r.height - player.h - 32;
      player.w = r.width / 4;
      player.x = (r.width / 2) - (player.w / 2);
    }
};

#endif