/** * Join an existing game * Arguments: the id of the game we want to connect to * Returns true on success, false on error * * @param int gameId * @return bool */ function JoinGame($gameId) { if (isset($_SESSION['userid'])) { $user = new User($_SESSION['userid']); return $user->JoinGame($gameId); } return false; }