MCPcopy Index your code

hub / github.com/ShrimpCryptid/Secret-Hitler-Online / functions

Functions258 in github.com/ShrimpCryptid/Secret-Hitler-Online

↓ 1 callersMethodassignRoles
Randomly assigns the player roles. @requires the number of players is between 5 and 10, inclusive. @modifies this @effects all Players in playerList
backend/src/main/java/game/SecretHitlerGame.java:305
↓ 1 callersMethodcheckIfGameOver
Updates the game state if the game ended by policies. @modifies this @effects sets this.state to the FASCIST_VICTORY_POLICY or LIBERAL_VICTO
backend/src/main/java/game/SecretHitlerGame.java:368
↓ 1 callersFunctioncheckValidServiceWorker
(swUrl, config)
frontend/src/serviceWorker.js:101
↓ 1 callersMethodconvert
Creates a JSON object from a SecretHitlerGame that represents its state. @param game the SecretHitlerGame to convert. @throws NullPointerException if
backend/src/main/java/server/util/GameToJSONConverter.java:44
↓ 1 callersMethoddetermineRolesToShow
* Updates which roles should be shown based on the role of the user. * @effects: if the user is {@code LIBERAL}, no roles will be shown. *
frontend/src/player/PlayerDisplay.js:58
↓ 1 callersMethodfadeAndReplaceText
()
frontend/src/status-bar/StatusBar.js:21
↓ 1 callersMethodfascistsCanWinByElection
()
backend/src/main/java/game/datastructures/board/Board.java:120
↓ 1 callersMethodgetAltText
* Gets the alt text for all images. * @return {String} {@code this.getNameWithYouTag}. * If this.props.showRole, appends a formatte
frontend/src/player/Player.js:117
↓ 1 callersMethodgetBusyPlayerSet
* Returns a set of players that should be considered 'busy' and marked on the interface. A player is considered * busy if the game is waiting for
frontend/src/player/PlayerDisplay.js:88
↓ 1 callersMethodgetConnections
Returns the set of websocket connections connected to this Lobby. @return a set of WsContexts, where each context is a user connected to the
backend/src/main/java/server/util/Lobby.java:91
↓ 1 callersMethodgetElectionTracker
()
backend/src/main/java/game/SecretHitlerGame.java:136
↓ 1 callersMethodgetHerokuAssignedPort
()
backend/src/main/java/server/SecretHitlerServer.java:96
↓ 1 callersMethodgetIcon
* Gets the relevant icon for the Player based on {@code this.props.role} * @return {image} the image source for either the liberal, fascist, or h
frontend/src/player/Player.js:41
↓ 1 callersMethodgetLastState
()
backend/src/main/java/game/SecretHitlerGame.java:100
↓ 1 callersMethodgetNumLiberalPolicies
()
backend/src/main/java/game/SecretHitlerGame.java:144
↓ 1 callersMethodgetRoleClass
* Changes the className based on the role (so that liberals can have blue text coloring). * @return {string} " liberal-text" if the role is LIBER
frontend/src/player/Player.js:66
↓ 1 callersMethodgetRoleImage
()
frontend/src/custom-alert/RoleAlert.js:53
↓ 1 callersMethodgetRoleImageAltText
()
frontend/src/custom-alert/RoleAlert.js:113
↓ 1 callersMethodgetTarget
()
backend/src/main/java/game/SecretHitlerGame.java:104
↓ 1 callersMethodgetUserCount
Returns the number of active users connected to the Lobby. @return the number of active websocket connections currently in the lobby.
backend/src/main/java/server/util/Lobby.java:280
↓ 1 callersMethodgetVotes
Returns a map representing what each player voted. @return a map, where the keys are the usernames and the booleans are the vote (yes/no) of
backend/src/main/java/game/SecretHitlerGame.java:537
↓ 1 callersMethodgetWeightedRandomIndex
(float[] weights)
backend/src/main/java/game/CpuPlayer.java:707
↓ 1 callersMethodhandleChancellorNomination
(SecretHitlerGame game)
backend/src/main/java/game/CpuPlayer.java:225
↓ 1 callersMethodhandleChancellorVoting
(SecretHitlerGame game)
backend/src/main/java/game/CpuPlayer.java:293
↓ 1 callersMethodhandleLegislativeChancellor
(SecretHitlerGame game)
backend/src/main/java/game/CpuPlayer.java:464
↓ 1 callersMethodhandleLegislativePresident
(SecretHitlerGame game)
backend/src/main/java/game/CpuPlayer.java:386
↓ 1 callersMethodhandlePostLegislative
(SecretHitlerGame game)
backend/src/main/java/game/CpuPlayer.java:613
↓ 1 callersMethodhandlePresidentVeto
(SecretHitlerGame game)
backend/src/main/java/game/CpuPlayer.java:515
↓ 1 callersMethodhandlePresidentialPowerElection
(SecretHitlerGame game)
backend/src/main/java/game/CpuPlayer.java:571
↓ 1 callersMethodhandlePresidentialPowerExecution
(SecretHitlerGame game)
backend/src/main/java/game/CpuPlayer.java:588
↓ 1 callersMethodhandlePresidentialPowerInvestigate
(SecretHitlerGame game)
backend/src/main/java/game/CpuPlayer.java:552
↓ 1 callersMethodhandlePresidentialPowerPeek
(SecretHitlerGame game)
backend/src/main/java/game/CpuPlayer.java:542
↓ 1 callersMethodhasPlayerVoted
Returns whether the given player has voted yet during the currently open voting round.
backend/src/main/java/game/SecretHitlerGame.java:457
↓ 1 callersMethodhasTimedOut
Returns whether the lobby has timed out. @return true if the Lobby has timed out.
backend/src/main/java/server/util/Lobby.java:81
↓ 1 callersFunctionif
(newState[PARAM_ELECTION_TRACKER] !== this.state.gameState[PARAM_ELECTION_TRACKER])
frontend/src/App.js:887
↓ 1 callersMethodinitializeDatabase
Initializes the database by adding the BACKUP table. @param c the connection to the database. @effects the Postgres SQL datbase has a new
backend/src/main/java/server/SecretHitlerServer.java:345
↓ 1 callersMethodinvestigate
()
backend/src/main/java/game/datastructures/Player.java:69
↓ 1 callersMethodisCpu
()
backend/src/main/java/game/datastructures/Player.java:55
↓ 1 callersMethodisLiberalInDanger
(SecretHitlerGame game)
backend/src/main/java/game/CpuPlayer.java:190
↓ 1 callersMethodkill
()
backend/src/main/java/game/datastructures/Player.java:63
↓ 1 callersMethodloadDatabaseBackup
Loads lobby data stored in the database (intended to be run on server wake). @effects {@code codeToLobby} is set to the stored database
backend/src/main/java/server/SecretHitlerServer.java:243
↓ 1 callersMethodmakePlayers
(int numPlayers)
backend/src/test/java/game/testSecretHitlerGame.java:13
↓ 1 callersMethodonClick
()
frontend/src/player/PlayerDisplay.js:182
↓ 1 callersMethodonPlayerSelected
* Called when the player is selected. Calls this.props.onSelection if the player is a valid choice. * @param name the name of the player. *
frontend/src/player/PlayerDisplay.js:216
↓ 1 callersMethodonWebSocketClose
Called when a websocket is closed. @param ctx the WsContext of the websocket. @modifies this @effects Removes the user from any connected lobbies.
backend/src/main/java/server/SecretHitlerServer.java:753
↓ 1 callersMethodonWebSocketMessage
Parses a websocket message sent from the user. @param ctx the WsMessageContext of the websocket. @requires the context must have the following parame
backend/src/main/java/server/SecretHitlerServer.java:562
↓ 1 callersMethodreadObject
Called when an object is deserialized (see Serializable in Java docs). Initializes the userToUsername and activeUsernames, as they are transient objec
backend/src/main/java/server/util/Lobby.java:396
↓ 1 callersMethodremoveUser
Removes a user from the Lobby. @param context the websocket connection context of the player to remove. @throws IllegalArgumentException if {@code co
backend/src/main/java/server/util/Lobby.java:222
↓ 1 callersMethodrender
()
frontend/src/player/Player.js:136
↓ 1 callersMethodresetDeck
Resets the Draw and Discard decks. @effects empties the discard deck, fills the draw deck with a standard card count, and shuffles.
backend/src/main/java/game/SecretHitlerGame.java:278
↓ 1 callersMethodresetVoteAnimation
()
frontend/src/player/PlayerDisplay.js:253
↓ 1 callersMethodsetupVoteAnimation
* Creates the voting animation sequence.
frontend/src/player/PlayerDisplay.js:227
↓ 1 callersMethodstartLegislativeSession
Starts the legislative session. Sets the available policies and the game state.
backend/src/main/java/game/SecretHitlerGame.java:651
↓ 1 callersMethodstartNewGame
Starts a new SecretHitlerGame with the connected users as players. @throws RuntimeException if there are an insufficient number of players to
backend/src/main/java/server/util/Lobby.java:463
MethodBoard
Constructs a new board. @modifies this @effects this is a new, empty board.
backend/src/main/java/game/datastructures/board/Board.java:26
MethodCpuPlayer
(String name)
backend/src/main/java/game/CpuPlayer.java:48
FunctionDISABLE_EXECUTED_PLAYERS
(name, gameState)
frontend/src/player/PlayerDisplay.js:316
FunctionDISABLE_INVESTIGATED_PLAYERS
(name, gameState)
frontend/src/player/PlayerDisplay.js:331
FunctionDISABLE_NONE
()
frontend/src/player/PlayerDisplay.js:307
FunctionDISABLE_TERM_LIMITED_PLAYERS
(name, gameState)
frontend/src/player/PlayerDisplay.js:349
MethodDeck
Constructs a new empty deck. @modifies this @effects this is a new deck with no Policies.
backend/src/main/java/game/datastructures/Deck.java:22
FunctionHelmetMetaData
(props)
frontend/src/util/HelmetMetaData.js:4
MethodLobby
Constructs a new Lobby.
backend/src/main/java/server/util/Lobby.java:55
MethodPlayer
Constructs a new Player with the given username. @param username The username of the player. @modifies this @effects this is a new Player that is aliv
backend/src/main/java/game/datastructures/Player.java:25
MethodPolicy
(Type type)
backend/src/main/java/game/datastructures/Policy.java:15
MethodRemoveUserTask
(String username)
backend/src/main/java/server/util/Lobby.java:256
MethodSecretHitlerGame
Constructs a new game of Secret Hitler with the given players. @param players the names of the players to add to the game. @requires there can be no
backend/src/main/java/game/SecretHitlerGame.java:174
FunctioncharactersLeft
()
frontend/src/util/MaxLengthTextField.js:9
MethodcheckLogin
Determines whether a login is valid. @param ctx the context of the login request. @requires the context must have the following parameters:
backend/src/main/java/server/SecretHitlerServer.java:394
FunctioncollapseSpaces
* Collapses whitespace characters (' ' and '\t') to single spaces. * @param text * @return the text, but any repeating sequences of '\t' or
frontend/src/util/MaxLengthTextField.js:44
MethodcompareTo
(CpuPlayer o)
backend/src/main/java/game/CpuPlayer.java:730
MethodcomponentDidMount
()
frontend/src/custom-alert/PolicyEnactedAlert.js:26
FunctioncomponentDidUpdate
(prevProps, prevState, snapshot)
frontend/src/board/Deck.js:40
MethodcomponentDidUpdate
(prevProps, prevState, snapshot)
frontend/src/status-bar/StatusBar.js:14
FunctioncomponentWillUnmount
()
frontend/src/custom-alert/IconSelection.js:41
FunctioncomponentWillUnmount
()
frontend/src/custom-alert/VotingPrompt.js:83
MethodcomponentWillUnmount
()
frontend/src/custom-alert/PolicyEnactedAlert.js:32
MethodcomponentWillUnmount
()
frontend/src/custom-alert/SelectPlayerPrompt.js:43
MethodcomponentWillUnmount
()
frontend/src/custom-alert/PeekPrompt.js:33
Functionconstructor
(props)
frontend/src/App.js:176
Functionconstructor
(props)
frontend/src/board/Deck.js:20
Functionconstructor
(props)
frontend/src/custom-alert/IconSelection.js:20
Functionconstructor
(props)
frontend/src/custom-alert/VetoPrompt.js:8
Functionconstructor
(props)
frontend/src/custom-alert/VotingPrompt.js:29
Functionconstructor
(props)
frontend/src/custom-alert/ElectionTrackerAlert.js:12
Functionconstructor
(props)
frontend/src/custom-alert/CustomAlert.js:6
Functionconstructor
(props)
frontend/src/event-bar/EventBar.js:6
Methodconstructor
(props)
frontend/src/player/PlayerDisplay.js:42
Methodconstructor
(props)
frontend/src/player/Player.js:29
Methodconstructor
(props)
frontend/src/custom-alert/PolicyEnactedAlert.js:19
Methodconstructor
(props)
frontend/src/custom-alert/PlayerDisplayPrompt.js:12
Methodconstructor
(props)
frontend/src/custom-alert/SelectPlayerPrompt.js:24
Methodconstructor
(props)
frontend/src/custom-alert/ButtonPrompt.js:9
Methodconstructor
(props)
frontend/src/custom-alert/PresidentLegislativePrompt.js:15
Methodconstructor
(props)
frontend/src/custom-alert/InvestigationAlert.js:18
Methodconstructor
(props)
frontend/src/custom-alert/ChancellorLegislativePrompt.js:15
Methodconstructor
(props)
frontend/src/custom-alert/PeekPrompt.js:14
Methodconstructor
(props)
frontend/src/status-bar/StatusBar.js:5
MethodcreateNewLobby
Generates a new lobby and returns the access code. @param ctx the HTTP get request context.
backend/src/main/java/server/SecretHitlerServer.java:435
MethodgetActivatedPower
()
backend/src/main/java/game/datastructures/board/FiveToSixPlayerBoard.java:11
← previousnext →101–200 of 258, ranked by callers