diff --git a/Better Together/Better Together/GameViews/GameViewController.swift b/Better Together/Better Together/GameViews/GameViewController.swift index 51510855c662312650c00b4ef3b2d27d66a16a07..a47a2716bdb5d9c13f548754823191f3dd1cf2d3 100644 --- a/Better Together/Better Together/GameViews/GameViewController.swift +++ b/Better Together/Better Together/GameViews/GameViewController.swift @@ -10,6 +10,7 @@ import SpriteKit import GameplayKit import MultipeerConnectivity +/// View Controller that manages the game scene in single play mode, as well as in mulitplayer mode. class GameViewController: UIViewController, LocalTeamPlayDelegate { var gamePlayMode: PlayMode? = nil diff --git a/Better Together/Better Together/Mutiplayer/LocalTeamPlayManager.swift b/Better Together/Better Together/Mutiplayer/LocalTeamPlayManager.swift index 303959332d476466b6224c122df66fcc84ec4bab..d62111f4c4d262145e7e10877860803ed3f1abc2 100644 --- a/Better Together/Better Together/Mutiplayer/LocalTeamPlayManager.swift +++ b/Better Together/Better Together/Mutiplayer/LocalTeamPlayManager.swift @@ -296,3 +296,64 @@ extension Notification.Name { static let gameResultReceived = Notification.Name(rawValue: "gameResultReceived") static let dimissedInvitationBrowserClient = Notification.Name(rawValue: "dismissedInvitationClient") } + + +/* ************************************************** Setup process in multiplayer mode ************************************************** */ +// +// +// ┌────────────────────────────┐ ┌────────────────────────────┐ +// │ Server │ │ Client │ +// └────────────────────────────┘ └────────────────────────────┘ +// │ ┌────────────────────┐ │ +// │ │ Send Invitation │ │ +// ├──────────────────┴────────────────────┴────────────────▶│ +// │ ┌────────────────────┐ │ +// │ │ Accept invitation │ │ +// │◀─────────────────┴────────────────────┴─────────────────┼─ +// ┌──────────────┤ │ +// │ Wait for all │ │ +// │ clients │ ┌────────────────────┐ │ +// └──────────────┤ │ send Invitation │ │ +// ├──────────────────┴────────────────────┴────────────────▶│ +// │ ┌────────────────────────────┐ │ +// │ │ Send clients customization │ │ +// │◀─────────────┴────────────────────────────┴─────────────┤ +// │ ┌────────────────────────────┐ │ +// │ │ Send selected level │ │ +// ├──────────────┴────────────────────────────┴────────────▶│ +// │ ┌────────────────────────────┐ │ +// │ │ Confirm level │ │ +// │◀─────────────┴────────────────────────────┴─────────────│ +// ┌──────────────┤ │ +// │ Wait for all │ │ +// │ clients │ ┌────────────────────────────┐ │ +// └──────────────┤ │ Send player info │ │ +// ├──────────────┴────────────────────────────┴────────────▶│ +// │ ┌────────────────────────────┐ │ +// │ │ Confirm info │ │ +// │◀─────────────┴────────────────────────────┴─────────────┤ +// ┌──────────────┤ │ +// │ Wait for all │ │ +// │ clients │ ┌────────────────────────────┐ │ +// └──────────────┤ │ Send start game │ │ +// ├──────────────┴────────────────────────────┴────────────▶│ +// │ ┌────────────────────────────┐ │ +// │ │ Send game scene loaded │ │ +// │◀─────────────┴────────────────────────────┴─────────────┤ +// ┌──────────────┤ │ +// │ Wait for all │ │ +// │ clients │ │ +// └──────────────┤ ┌────────────────────────────┐ │ +// │ │ Send game started │ │ +// ├──────────────┴────────────────────────────┴────────────▶│ +// │ │ +// │ │ +// │ │ +// │ │ +// │ │ +// │ │ +// │ │ +// ▼ ▼ +// +// +/* ********************************************************************************************************************************** */