public function test_dealCards_removes_from_deck_number_of_cards_dealt() { $a = new Pontoon(); $deck = $a->newShuffledDeck(); $a->dealCards($deck, 10); $this->assertEquals(42, count($deck)); }
function displayScores() { $scores = ''; $a = new Pontoon(); $deck = $a->newShuffledDeck(); $hand = $a->dealCards($deck, 2); foreach ($hand as $card) { $scores .= $card['name'] . " of " . $card['suit'] . "<br>"; } $score = $a->scoreHand($hand); $scores .= "Your possible scores are "; foreach ($score as $option) { $scores .= $option . ", "; } return $scores; }
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <?php require_once '../../pontoon.php'; ?> <?php Pontoon::header(); ?> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title><?php echo _w('Mozilla Labs Test Pilot'); ?> </title> <link rel="stylesheet" type="text/css" media="all" href="screen.css" /> <script type="text/javascript"> var s_account="mozillatestpilotmozillalabscom"; </script> </head> <body> <div id="container"> <div id="logo"><a href="http://labs.mozilla.com"><img src="images/logo.png" border="0"></a></div> <div id="download"><div id="downloadsource" class="button" onclick="window.location='https://addons.mozilla.org/services/install.php?addon_id=testpilot'"><img class="downloadButton" src="images/download_arrow.png"> <span class="downloadH1"><?php echo _w('Become a Test Pilot!'); ?> </span> </div></div> <div id="content">
/** * Wrapper for gettext(), returns Pontoon-wrapped strings to * be handled by the Pontoon client component */ function _w($original) { return Pontoon::wrap($original); }