Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/anthdm/ggpoker
/ functions
Functions
115 in github.com/anthdm/ggpoker
⨍
Functions
115
◇
Types & classes
33
↓ 18 callers
Method
Get
()
p2p/atomic_int.go:26
↓ 15 callers
Method
AddPlayer
NOTE: Adding a player to the table should set the gameStatus to Ready.
p2p/table.go:196
↓ 8 callers
Method
GetPlayerAfter
(addr string)
p2p/table.go:92
↓ 6 callers
Function
NewTable
(maxSeats int)
p2p/table.go:32
↓ 6 callers
Method
Set
(value int32)
p2p/atomic_int.go:22
↓ 6 callers
Method
get
(index any)
p2p/players_list.go:54
↓ 5 callers
Function
JSON
(w http.ResponseWriter, status int, v any)
p2p/api.go:30
↓ 5 callers
Method
LenPlayers
()
p2p/table.go:122
↓ 5 callers
Method
sendToPlayers
(payload any, addr ...string)
p2p/game_state.go:281
↓ 5 callers
Method
setStatus
(s GameStatus)
p2p/game_state.go:169
↓ 4 callers
Method
Connect
TODO(@anthdm): Right now we have some redundent code in registering new peers to the game network. maybe construct a new peer and handshake protocol a
p2p/server.go:183
↓ 4 callers
Function
NewAtomicInt
(value int32)
p2p/atomic_int.go:12
↓ 4 callers
Method
getPlayer
(addr string)
p2p/table.go:153
↓ 4 callers
Function
makeHTTPHandleFunc
(f apiFunc)
p2p/api.go:22
↓ 4 callers
Function
makeServerAndStart
(addr, apiAddr string)
main.go:10
↓ 3 callers
Method
GetPlayerBefore
(addr string)
p2p/table.go:66
↓ 3 callers
Method
RemovePlayerByAddr
(addr string)
p2p/table.go:129
↓ 3 callers
Method
Send
(b []byte)
p2p/tcp_transport.go:21
↓ 3 callers
Method
String
()
p2p/server.go:18
↓ 3 callers
Method
TakeAction
(action PlayerAction, value int)
p2p/game_state.go:95
↓ 3 callers
Method
getCurrentDealerAddr
()
p2p/game_state.go:180
↓ 3 callers
Method
getOtherPlayers
()
p2p/game_state.go:312
↓ 3 callers
Method
incNextPlayer
()
p2p/game_state.go:147
↓ 2 callers
Method
AddPlayerOnPosition
(addr string, pos int)
p2p/table.go:177
↓ 2 callers
Function
Encrypt
(key, payload []byte)
deck/encrypt.go:33
↓ 2 callers
Method
Error
()
p2p/api.go:16
↓ 2 callers
Method
GetPlayer
(addr string)
p2p/table.go:146
↓ 2 callers
Method
List
()
p2p/players_list.go:20
↓ 2 callers
Function
NewMessage
(from string, payload any)
p2p/message.go:13
↓ 2 callers
Function
NewPlayer
(addr string)
p2p/table.go:16
↓ 2 callers
Method
Peers
()
p2p/server.go:141
↓ 2 callers
Method
SendHandshake
(p *Peer)
p2p/server.go:155
↓ 2 callers
Method
SetPlayerStatus
(addr string, s GameStatus)
p2p/table.go:166
↓ 2 callers
Method
SetReady
SetReady is being called when we set ourselfs as ready.
p2p/game_state.go:273
↓ 2 callers
Method
add
(addr string)
p2p/players_list.go:34
↓ 2 callers
Method
advanceToNexRound
()
p2p/game_state.go:137
↓ 2 callers
Method
canTakeAction
(from string)
p2p/game_state.go:50
↓ 2 callers
Method
getIndex
(addr string)
p2p/players_list.go:42
↓ 2 callers
Method
len
()
p2p/players_list.go:27
↓ 1 callers
Method
AddPeer
(p *Peer)
p2p/server.go:134
↓ 1 callers
Method
Broadcast
(broadcastMsg BroadcastTo)
p2p/server.go:277
↓ 1 callers
Function
DecryptCard
(key, encCard []byte)
deck/encrypt.go:8
↓ 1 callers
Function
EncryptCard
(key []byte, card Card)
deck/encrypt.go:23
↓ 1 callers
Method
Inc
()
p2p/atomic_int.go:30
↓ 1 callers
Method
InitiateShuffleAndDeal
()
p2p/game_state.go:228
↓ 1 callers
Method
ListenAndAccept
()
p2p/tcp_transport.go:54
↓ 1 callers
Function
NewAPIServer
(listenAddr string, game *GameState)
p2p/api.go:40
↓ 1 callers
Function
NewCard
(s Suit, v int)
deck/deck.go:47
↓ 1 callers
Function
NewGame
(addr string, bc chan BroadcastTo)
p2p/game_state.go:31
↓ 1 callers
Function
NewPlayersList
()
p2p/players_list.go:14
↓ 1 callers
Function
NewServer
(cfg ServerConfig)
p2p/server.go:57
↓ 1 callers
Function
NewTCPTransport
(addr string)
p2p/tcp_transport.go:48
↓ 1 callers
Method
ReadLoop
(msgch chan *Message)
p2p/tcp_transport.go:26
↓ 1 callers
Method
Run
()
p2p/api.go:47
↓ 1 callers
Method
SetPlayerReady
SetPlayerReady is getting called when we receive a ready message from a player in the network taking a seat on the table.
p2p/game_state.go:251
↓ 1 callers
Method
SetStatus
(s GameStatus)
p2p/game_state.go:164
↓ 1 callers
Method
ShuffleAndEncrypt
(from string, deck [][]byte)
p2p/game_state.go:185
↓ 1 callers
Method
Start
()
p2p/server.go:97
↓ 1 callers
Method
clear
()
p2p/table.go:118
↓ 1 callers
Method
getNextFreeSeat
()
p2p/table.go:214
↓ 1 callers
Method
getNextGameStatus
()
p2p/game_state.go:120
↓ 1 callers
Method
handleGetMsgPlayerAction
(from string, msg MessagePlayerAction)
p2p/server.go:338
↓ 1 callers
Method
handleMessage
(msg *Message)
p2p/server.go:322
↓ 1 callers
Method
handleMsgEncDeck
(from string, msg MessageEncDeck)
p2p/server.go:354
↓ 1 callers
Method
handleMsgPreFlop
(from string)
p2p/server.go:342
↓ 1 callers
Method
handleMsgReady
(from string)
p2p/server.go:348
↓ 1 callers
Method
handleNewPeer
(peer *Peer)
p2p/server.go:237
↓ 1 callers
Method
handlePeerList
TODO FIXME: (@anthdm) maybe goroutine??
p2p/server.go:364
↓ 1 callers
Method
handlePlayerAction
(from string, action MessagePlayerAction)
p2p/game_state.go:59
↓ 1 callers
Method
handshake
(p *Peer)
p2p/server.go:300
↓ 1 callers
Method
isFromCurrentDealer
(from string)
p2p/game_state.go:55
↓ 1 callers
Method
isInPeerList
(addr string)
p2p/server.go:171
↓ 1 callers
Method
loop
()
p2p/server.go:203
↓ 1 callers
Method
loop
()
p2p/game_state.go:295
↓ 1 callers
Method
maybeDeal
()
p2p/game_state.go:243
↓ 1 callers
Method
sendPeerList
(p *Peer)
p2p/server.go:109
↓ 1 callers
Function
shuffle
(d Deck)
deck/deck.go:78
↓ 1 callers
Function
suitToUnicode
(s Suit)
deck/deck.go:90
Method
AddPlayer
(from string)
p2p/game_state.go:288
Method
Len
()
p2p/players_list.go:73
Method
Less
(i, j int)
p2p/players_list.go:77
Method
Network
()
p2p/tcp_transport.go:13
Function
New
()
deck/deck.go:60
Function
NewGossipServerClient
(cc grpc.ClientConnInterface)
proto/service_grpc.pb.go:28
Method
Players
()
p2p/table.go:51
Function
RegisterGossipServerServer
(s grpc.ServiceRegistrar, srv GossipServerServer)
proto/service_grpc.pb.go:52
Method
String
()
p2p/tcp_transport.go:12
Method
String
()
p2p/message.go:39
Method
String
()
p2p/message.go:53
Method
String
()
p2p/atomic_int.go:18
Method
String
()
p2p/table.go:39
Method
String
()
p2p/game_status.go:5
Method
String
()
p2p/game_status.go:29
Method
String
()
deck/deck.go:11
Method
String
()
deck/deck.go:38
Method
Swap
(i, j int)
p2p/players_list.go:74
Function
TestEncryptCard
(t *testing.T)
deck/encrypt_test.go:8
Function
TestTableAddPlayer
(t *testing.T)
p2p/table_test.go:85
Function
TestTableGetPlayer
(t *testing.T)
p2p/table_test.go:100
Function
TestTableGetPlayerAfter
(t *testing.T)
p2p/table_test.go:27
next →
1–100 of 115, ranked by callers