VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "clsNetworkGame"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit

Private m_oPlayers As Collection

Public Property Get Players() As Collection
    Set Players = m_oPlayers
End Property

Private Sub Class_Initialize()

    Set m_oPlayers = New Collection
    
End Sub
Public Sub RemovePlayer(oPlayer As clsNetworkPlayer)

    Call m_oPlayers.Remove("#" & CStr(oPlayer.Number))

End Sub
Public Sub AddPlayer(oPlayer As clsNetworkPlayer)

    Call m_oPlayers.Add(oPlayer, "#" & CStr(oPlayer.Number))

End Sub
Public Function FindPlayer(nNumber As Long) As clsNetworkPlayer
    
    Dim oPlayer As clsNetworkPlayer
    Set FindPlayer = Nothing
    
    For Each oPlayer In m_oPlayers
        If oPlayer.Number = nNumber Then
            Set FindPlayer = oPlayer
            Exit Function
        End If
    Next oPlayer

End Function
