public class PlayerAnimation extends MyFrame {
    public void run() {
        Car player=new Car(100, 200, 0, 0); // 変更： 移動方向は縦横ともに0
        while (true) {
            clear();
            player.draw(this);
            player.move();
            sleep(0.1);
        }
    }
}
