function ledBoard($text, $color) { $text = strtoupper($text); if ($color == "random") { $color = generateRandomColor(); } for ($i = 0; $i < strlen($text); $i++) { if (is_integer($text[$i])) { drawDigit($text[$i], $color); } elseif (isVowel($text[$i])) { drawVowel($text[$i], $color); } else { drawLetter($text[$i], $color); } } }
function ledBoard($text, $color) { if ($color == "random") { $color = generateRandomHex(); //YOU NEED TO IMPLEMET THIS FUNCTION } for ($i = 0; $i < strlen($text); $i++) { if (is_integer($text[$i])) { drawDigit($text[$i], $color); } elseif (isVowel($text[$i])) { //YOU NEED TO IMPLEMENT THE "isVowel" function! drawVowel($text[$i], $color); } else { drawLetter($text[$i], $color); } } }