Uncategorized

Cub scout Fun with First Aid

One of the requirements I had to do as den leader was the First Aid unit.  And the kids had to know some first responder stuff, so I decided to do a bingo type game.  Where I would read out a scenario and they would have to mark which type of incident I was describing.  But I wanted to make them random.  So being the geek I am with Powershell, I wrote this little blurb that would take the 12 different scenarios and make a grid out of them You could also do this like Tic-Tac-Toe where they could take turns after reading each one outloud X would go, then Y and so on until somebody won.  But here is the script

$values = @("Cuts and Scratches","Burns and Scalds","sunburn","Blisters on the hand and foot","Tick Bites","Bites and Stings of other insects","Venemous Snakebite","Nosebleed","Frostbite","Emergency Readiness 1","Emergency Rediness 2","Emergency Services")
Function Get-RandomNumbers
{
                Param([int]$Numbers=10,[int]$Low=0,[int]$High=999)
                $Output = New-Object System.Collections.ArrayList
                $Index = New-Object System.Collections.ArrayList
                $Index.AddRange($Low..$High)
                while($Output.Count -lt $Numbers)
                {
                                $Random = $Index | Get-Random -Count 1
                                [void] $Output.Add($Random)
                                $Index.Remove($Random)
                }
                $Output
}
while ($x -lt 25) {
$X ++
$randomnms = Get-RandomNumbers -Low 0 -High 11 -Numbers 12
$string='<Table border=1><TR Height=120px>'
for ($i=0;$i -lt 3;$i++) {
$string=$string + "<TD WIDTH=180px>" + $values[$randomnms[$i]] +"</TD>"
}
$string=$string + "</TR><TR Height=120px>"
for ($i=4;$i -lt 7;$i++) {
$string=$string + "<TD>" + $values[$randomnms[$i]] +"</TD>"
}
$string=$string + "</TR><TR Height=120px>"
for ($i=8;$i -lt 11;$i++) {
$string=$string + "<TD>" + $values[$randomnms[$i]] +"</TD>"
}
$string=$string + "</TR>"
$string | Out-File c:\logs\index$($x).html
}