This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def join_game(user_id, game_id) do | |
with {:user, {:ok, user}} <- {:user, Users.get(user_id)}, | |
{:game, {:ok, game}} <- {:game, Games.get(game_id)}, | |
{:full, false} <- {:full, Game.is_full?(game)}, | |
{:started, false} <- {:started, Game.is_started?(game)}, | |
{:allowed, true} <- {:allowed, User.has_permission?(user, game)} | |
do | |
Game.add_user(game, user) | |
else | |
{:user, :not_found} -> {:error, "User not found"} |
UPDATE: Following instructions are now a year old. I have recently managed to upgrade react-native-maps from 0.17 to the latest version 0.21 with react-native 0.51 - if you want to follow my instruction scroll down to the end this doc! Hope that will work for you too!
This is for my personal use, things might not be correctly explained here. For the official docs please check https://github.com/airbnb/react-native-maps
Steps from scratch:
1.react-native init GoogleMapPlayground
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function whatDoesItDo(val){ | |
return val ? 1 : 2; | |
} |