public boolean saveGame(Game game) {
        if(game != null) {
            try {
                // If the directory does not exist yet, create it
                if(!new File(savefolder).exists()) {
                    new File(savefolder).mkdirs();
                }
                
                FileOutputStream fos = new FileOutputStream(savefolder + game.id);
                ObjectOutputStream oos = new ObjectOutputStream(fos);
                oos.writeObject(game);
                oos.close();
                
                return true;
            }
            catch(Exception ex) {
                ex.printStackTrace();
                return false;
            }
        }
        else {
            return false;
        }
    }