Game Development Reference
Dim surname As String
Debug.WriteLine("+++++++++ LOADING NEW PEOPLE.")
'Remove prior people.
'Load up the roster with new people.
For Each surname In people
Roster.Add(New Person(surname, MDB))
Uncomment the call to PeopleButton_Click that is near the end of the
Cruise_Load event handler. We had commented it earlier because we lacked any
people code. Now that we have the Person class complete, we can do more
Run this code in the debugger and look at the output in the Immediate window.
Click the People button. The code claims to be loading new people. We would
like to see these people. Stop debugging and add the flowing code to the Cruise
'Dump all of the people and their relationships.
Private Sub DumpButton_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles DumpButton.Click
'Dump all of the pair-wise relationships.
Dim PersonA As Person
Dim PersonB As Person
'Do all of the people.
For Each PersonA In Roster
'Make some blank space for readability.
'Dump my personal stats.
'Do all of the pair-wise relationships.
For Each PersonB In Roster
'(With everyone but me.)
If PersonA IsNot PersonB Then
Call DumpRelationship(PersonA, PersonB)