@@ -0,0 +1,1135 @@
+/**%0A * @(#)SnakeRun.java%0A *%0A *%0A * @authors Martin Verde%0A * @version 1.00 2014/5/27%0A */%0Aimport javax.swing.JOptionPane;%0Aimport java.util.concurrent.TimeUnit;%0A%0Apublic class SnakeRun extends SnakeObject %0A%7B%0A    public void runGame(SnakeMenu men, SnakeGrid gr)  //runs a game of snake%0A    %7B%0A    %09men = new SnakeMenu(2,1);%0A    %09while(men.getPlaying().equals(%22f%22))%0A    %09%7B%0A    %09%09int i = 0;%0A    %09%7D%0A    %09JOptionPane.showMessageDialog(null,%22Get Ready!%22,%22MESSAGE%22,JOptionPane.ERROR_MESSAGE);%0A    %09gr = new SnakeGrid(31,31);%0A        try%0A        %7B%0A        %09TimeUnit.NANOSECONDS.sleep(2);%0A        %7D%0A        catch(Exception e)%0A        %7B%0A        %09System.out.println(%22error%22);%0A        %7D%0A        SnakePlayer player = new SnakePlayer(gr);%0A        while(player.getLife())%0A        %7B%0A        %09if(player.getNumFood()%3C1)%0A        %09%09player.foodGenerator();%0A        %09player.update();%0A        %7D%0A        JOptionPane.showMessageDialog(null,%22Game Over! Your score was: %22 + player.getScore(),%22MESSAGE%22,JOptionPane.ERROR_MESSAGE);%0A        if(!player.getLife())%0A        %7B%0A        %09gr.closeFrame();%0A        %09men.setPlaying();%0A        %7D%0A        runGame(men,gr);%0A    %7D  %0A%7D%0A

Create SnakeRun.java