public void paint(Graphics gr)
    {
        Image i=createImage(getSize().width, getSize().height);
        Graphics2D g2 = (Graphics2D)i.getGraphics();
        if (status==Status.Run || status==Status.OneStep)
        {
            g2.setColor(Color.BLACK);
            g2.fillRect(0,0,SCWIDTH,SCLENGTH);
            Square.drawAll(g2);
            for (int n=0;n<Bike.amt();n++)
            {
                Bike.get(n).draw(g2);
            }
            Draw.drawList(g2,true);
//            if (status==Status.OneStep)
//                status=Status.Pause;
        }
        else if (status==Status.Win)
        {
            int winner=-1;
            for (int n=0;n<Bike.amt();n++)
            {
                if (Bike.get(n).isAlive())
                {
                    winner=n;
                    Bike.get(n).draw(g2);
                    break;
                }
            }
            Square.drawAll(g2);
            Color c=Bike.getColor(winner);
            c=new Color(c.getRed(),c.getGreen(),c.getBlue(),100);
            g2.setColor(c);
            g2.fillRect(0,0,SCWIDTH,SCLENGTH);
            g2.setColor(Color.BLACK);
            g2.setFont(new Font("Arial",Font.BOLD,90));
            if (winner!=-1)
                g2.drawString(Bike.get(winner).getWinPhrase(),300,470);
            else 
                g2.drawString("Tie!",470,470);
        }
        else if (status==Status.Pause)
        {
            
            g2.setColor(Color.BLACK);
            g2.fillRect(0,0,SCWIDTH,SCLENGTH);
            Square.drawAll(g2);
            for (int n=0;n<Bike.amt();n++)
            {
                Bike.get(n).draw(g2);
            }
            Draw.drawList(g2,false);
            g2.setColor(Color.WHITE);
            g2.drawString("Paused",500,450);
            
        }
        g2.dispose();
        gr.drawImage(i, 0, 0, this);
    }