Rails.application.routes.draw do
  resources :players
  resources :tables do
    member do
      post 'new_game'
    end
    resources :seats do
      member do
        patch 'sit'
        patch 'stand'
      end
    end
    resources :games do
      # member do
      #   post :join
      # end
    end
  end

  resources :seats do
    member do
      post 'sit'
      post 'stand'
    end
  end
 
  resources :games do
    member do
      get 'my-inventory'
      post 'start'
      post 'join'
      post 'play_hand'
    end
    resources :seats do
      member do
        patch 'sit'
        patch 'stand'
      end
    end
  end

  root to: 'visitors#index'
  get '/play-now', to: 'tables#play_now', as: 'play_now'
  get '/tutorial', to: 'tables#tutorial', as: 'tutorial'
  devise_for :users, controllers: { registrations: "users/registrations" }
  resources :users
  get '/loaderio-456644f4db1fcd1e8578be882d2fc476.txt', to: redirect('/assets/loaderio-456644f4db1fcd1e8578be882d2fc476.txt')
  get '/loaderio-eb4afd672bf5b9af467fbadcba243f26.txt', to: redirect('/assets/loaderio-eb4afd672bf5b9af467fbadcba243f26.txt')
end
