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
-
Method Summary
Modifier and TypeMethodDescriptionLoads aGame
from a given URL.static void
The 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.boolean
writePreferences
(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:
true
if 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:
null
if the preferences could not be read
-
loadGame
Loads aGame
from a given URL.- Throws:
Exception
-
main
The command line contains the name of the game and a URL from where to load it.
-