Package edu.pdx.cs410J.security
Class GameConsole
java.lang.Object
edu.pdx.cs410J.security.GameConsole
- Direct Known Subclasses:
GameConsolePriv
This class represents a game console that can play many games.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionLoads aGamefrom a given URL.static voidThe command line contains the name of the game and a URL from where to load it.readPreferences(Game game) Called from the Game to read a game's preferences file.booleanwritePreferences(Game game, String prefs) Called from the Game to write a game's preferences file.
-
Constructor Details
-
GameConsole
public GameConsole()
-
-
Method Details
-
writePreferences
Called from the Game to write a game's preferences file.- Returns:
trueif the preferences were sucessfully written (note that we don't want the name of the preferences file escaping!)
-
readPreferences
Called from the Game to read a game's preferences file.- Returns:
nullif the preferences could not be read
-
loadGame
Loads aGamefrom a given URL.- Throws:
Exception
-
main
The command line contains the name of the game and a URL from where to load it.
-