Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/pepperview/romzinger/GameLoader.java


1   /*
2    * GameLoader.java -
3    * Copyright (C) 2000 Fabrice Armisen
4    *
5    * This program is free software; you can redistribute it and/or
6    * modify it under the terms of the GNU General Public License
7    * as published by the Free Software Foundation; either version 2
8    * of the License, or any later version.
9    *
10   * This program is distributed in the hope that it will be useful,
11   * but WITHOUT ANY WARRANTY; without even the implied warranty of
12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13   * GNU General Public License for more details.
14   *
15   * You should have received a copy of the GNU General Public License
16   * along with this program; if not, write to the Free Software
17   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18   */
19  
20  package com.pepperview.romzinger;
21  
22  import java.io.IOException;
23  import java.io.File;
24  
25  /**
26   *  Description of the Class
27   *
28   * @author     Fabrice Armisen
29   * @created    May 17, 2001
30   */
31  public class GameLoader
32  {
33    /**
34     *  Description of the Method
35     *
36     * @param  name             Description of Parameter
37     * @return                  Description of the Returned Value
38     * @exception  IOException  Description of Exception
39     * @since
40     */
41    public static Game loadGameFile( String name ) throws IOException
42    {
43      Game game = null;
44      if ( name.endsWith( ".zip" ) )
45      {
46        game = new ZippedGame();
47        game.load( new File( name ) );
48      }
49      return game;
50    }
51  }
52