Skip to content

iCopyPasta/COMP512App

Repository files navigation

Java Files' Class description

  • BonusRoundFragment - handles local bonus round logic
  • CodenameGenerator - generates friendly names in a random fashion
  • GameStateContainer - contains the global state view that a peer believes to be true
  • JoinPeerAlert - dialog to let a user know whether or not to join someone
  • MainActivity - the main screen with "host" or "find opponent" screen
  • PeerDataItem - class to encapsulate an item on the screen of joinable peers
  • PeerListItemsFragment - handles the view for the list of joinable peers
  • PeerState - class to encapsulate a single node in the network
  • TextFight - the controlling activity for all three visiual fragments
  • TextMainArenaFragment - handles the local regular game logic

Issues and general location in code

Global State View

  • Main logic for processing is in TextFight in onPayloadReceived
  • PeerState and GameStateContainer objects are used for broadcasting back and forth.

Voting/Declaration of a Winner:

  • onSetWinnerSnapshot and gatherVotes in TextFight
  • claim victory methods in BonusRoundFragment and TextMainArenaFragment

Peer Connection/Topology:

  • Handled in TextFight in various methods, including connectionLifecycleCallback object with method onDisconnnected, and general rebroadcasting in TextFight in onPayloadReceived

Message Passing

  • TextFight in onPayloadReceived
  • onSendBroadcast which calls the API's sendPayload method

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages