Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

All Bad Cards #46

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

All Bad Cards #46

wants to merge 2 commits into from

Conversation

tannerkrewson
Copy link
Owner

@jakelauer

With this code, users will end up in the same all bad cards room, but will have some weird errors and the game won't work. 馃 鉂わ笍

@tannerkrewson tannerkrewson changed the base branch from master to dev October 4, 2020 01:10
@tannerkrewson
Copy link
Owner Author

I just spent like half an hour looking for your messages to tell you that there's now a way to create a game in ABC from an external URL
You can do so by hitting https://allbad.cards/api/abc/external-create and providing the following via queryString:

isHost (boolean)
userName (string)
roomId (string)

if isHost is false, the user will join the game
otherwise, they will create a new game

the request to create the game must come from the host's browser, because it sets a cookie that ensures that the game knows they are the game's owner

@tannerkrewson
Copy link
Owner Author

tannerkrewson commented Jan 23, 2021

Currently, iirc rocketcrab can't support making the api call from the hosts browser. but there may be a to do it anyways, and this is likely a situation it should support. Looking into it now ...

@tannerkrewson
Copy link
Owner Author

Ok, I deleted this branch and pushed up a second attempt. I think the host is creating the game correctly with url call that looks like

https://allbad.cards/api/abc/external-create?rocketcrab=true&userName=Jake&isHost=true&roomId=rocketcrab-62557bb8c0a4b752

but when the other players attempt to navigate to

https://allbad.cards/api/abc/external-create?rocketcrab=true&userName=Tanner&isHost=false&roomId=external-room-rocketcrab-62557bb8c0a4b752

they get Game not found: undefined. It says that whether the external-room- is prepended or not. 馃

@jakelauer
Copy link

Good catch - there was a bug upon joining a created game, which should be fixed now!

@tannerkrewson
Copy link
Owner Author

Hey Jake, sorry for the delay again, I was focused on Drawphone.

So I've added all three of your games in that last commit. The url from before didn't seem to be working, so I removed the abc/ and it creates the game, but both the host and the guest see a "Join Game" button. The host's gives an error, and the guest's works, but they have to enter a username, which should be provided by the url.

Let me know if you need any more info. The recent changes to the your site look really nice, Good work!!!! 馃槃

@tannerkrewson
Copy link
Owner Author

is this fixed? i havent checked, yet so apologies if it is. looking to get these new games merged soon. ive been putting it off for long enough!!

Copy link
Contributor

@mavit mavit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add BGG IDs.

basedOn: {
game: "Cards Against Humanity",
link: "https://cardsagainsthumanity.com/",
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
},
bggId: 50381,
},

game: "Apples to Apples",
link:
"https://www.mattelgames.com/games/en-us/family/apples-apples",
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
},
bggId: 74,
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants