Network disconnection
Description
상대방의 영웅 파티가 나타났습니다. 상대방과 겨룰 때에는 서로 겹치는 영웅들끼리만 대전을 할 수 있습니다.
내가 가진 영웅 heros
과 상대의 영웅 oppHeros
끼리 겹치는 영웅으로 이루어진 Set인 intersectHeros
를 구하세요.
- Swift 최신 버전에서
intersect
가intersection
으로 이름이 변경되었습니다. Tryhelloworld 실습에서는intersect
를 쓰시되, Playground등 Swift3 환경에서는intersection
을 써주세요.
Fill type challenge HOWTO
- In the Fill type challenge, you have to fill the blank with appropriate code
- The given code except the blank cannot be edited.
- An error message will be shown in the Result area when you leave the blank empty.
1
2
3
4
5
6
7
8
9
import Foundation
let heros = ["프린스", "마녀", "해골 군대", "고블린 통"]
let oppHeros = ["자이언트 해골", "고블린 통", "대형석궁"]
// 상대와 겹치는 영웅들로 이뤄진 set을 완성하세요
let intersectHeros =
print(intersectHeros)
Result
Stop
Result of [Run] or [Submit] will be displayed here