Upgrade to Pro — share decks privately, control downloads, hide ads and more …

2018 - COSCUP - 來做一個日系卡牌手遊吧!

2018 - COSCUP - 來做一個日系卡牌手遊吧!

蒼時弦や

August 14, 2018
Tweet

More Decks by 蒼時弦や

Other Decks in Programming

Transcript

  1. ~=

  2. SOP

  3. OS

  4. def draw weights = @items.map(&:weight) n = (1..weights.sum) weights.each_with_index do

    |weight, i| n -= weight return @items[i] if n <= 0 end end
  5. Ruby on Rails describe 'GET /v1/chapters/:id/stories' do before do get

    api_v1_chapter_stories_path(chapter), params: params end it_behaves_like 'valid response' it 'returns available chapters' do json = JSON.parse(response.body) hash = JSON.parse(serialized_json(chapter.stories)) expect(json).to match_array(hash) end end
  6. Ruby on Rails it 'returns canceled mission' do json =

    JSON.parse(response.body) hash = JSON.parse(serialized_json(mission.reload)) expect(json).to match(hash) end it 'should have canceled_at time' do json = JSON.parse(response.body) expect(json['canceled_at']).not_to be_nil end
  7. Ex.

  8. VPS

  9. GCP

  10. AWS

  11. ufw

  12. VPC