You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
4.0 KiB

{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"getNextPlayer"},{"kind":"text","text":"("},{"kind":"externalParam","text":"board"},{"kind":"text","text":": "},{"kind":"typeIdentifier","identifier":"doc:\/\/Model\/documentation\/Model\/Board","preciseIdentifier":"s:5Model5BoardV","text":"Board"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Int","preciseIdentifier":"s:Si"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"return-value","level":2,"type":"heading","text":"Return Value"},{"type":"paragraph","inlineContent":[{"type":"text","text":"id of next palyer to play"}]}]},{"kind":"parameters","parameters":[{"name":"board ","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"board game"}]}]}]},{"kind":"content","content":[{"anchor":"discussion","level":2,"type":"heading","text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The player who must play is the one who has the fewest tokens"}]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/model\/rules\/getnextplayer(board:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/Model\/documentation\/Model\/Rules\/getNextPlayer(board:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Returns id of next palyer to play"}],"kind":"symbol","metadata":{"role":"symbol","title":"getNextPlayer(board:)","roleHeading":"Instance Method","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"getNextPlayer"},{"kind":"text","text":"("},{"kind":"externalParam","text":"board"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Board","preciseIdentifier":"s:5Model5BoardV"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Int","preciseIdentifier":"s:Si"}],"symbolKind":"method","externalID":"s:5Model5RulesP13getNextPlayer5boardSiAA5BoardV_tF","required":true,"modules":[{"name":"Model"}]},"hierarchy":{"paths":[["doc:\/\/Model\/documentation\/Model","doc:\/\/Model\/documentation\/Model\/Rules"]]},"references":{"doc://Model/documentation/Model":{"role":"collection","title":"Model","abstract":[],"identifier":"doc:\/\/Model\/documentation\/Model","kind":"symbol","type":"topic","url":"\/documentation\/model"},"doc://Model/documentation/Model/Rules/getNextPlayer(board:)":{"role":"symbol","title":"getNextPlayer(board:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"getNextPlayer"},{"kind":"text","text":"("},{"kind":"externalParam","text":"board"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Board","preciseIdentifier":"s:5Model5BoardV"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","text":"Int","preciseIdentifier":"s:Si"}],"abstract":[{"type":"text","text":"Returns id of next palyer to play"}],"identifier":"doc:\/\/Model\/documentation\/Model\/Rules\/getNextPlayer(board:)","kind":"symbol","required":true,"type":"topic","url":"\/documentation\/model\/rules\/getnextplayer(board:)"},"doc://Model/documentation/Model/Rules":{"role":"symbol","title":"Rules","fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"Rules"}],"abstract":[{"type":"text","text":"Rules of Connect 4 game"}],"identifier":"doc:\/\/Model\/documentation\/Model\/Rules","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Rules"}],"url":"\/documentation\/model\/rules"},"doc://Model/documentation/Model/Board":{"role":"symbol","title":"Board","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Board"}],"abstract":[{"type":"text","text":"The board of the Connect 4 game"}],"identifier":"doc:\/\/Model\/documentation\/Model\/Board","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Board"}],"url":"\/documentation\/model\/board"}}}