Visa källkod

Nedanstående filer finns i denna katalog. Klicka på en fil för att visa dess innehåll.

bth-cards/

  1. .buildpath
  2. .project
  3. CCard.php
  4. CCardHand.php
  5. CDeck.php
  6. argyle.jpg
  7. card.php
  8. common.php
  9. deck.php
  10. grunge.jpg
  11. hand.php
  12. index.php
  13. sessDest.php
  14. sessions.php
  15. sessions_mroos.php
  16. source.php
  17. template.php
  18. tiles.jpg

Stäng "CCardHand.php"

<?php

// ===============================================================
// Contents: Kortkod.
// Author: Staffan Lindsgård
// ===============================================================

require_once("CDeck.php");

class CCardHand {

    private $theHand;

	function __construct() {
		$this->theHand = Array();
	}

	function __destruct() {
		;
	}

	public function AddCard($thecard) {
		array_push($this->theHand, $thecard);
	}

	public function DropAllCards() {
		$this->theHand = Array();
	}

	public function GetHandAsCSS() {
		$html = '';
		foreach($this->theHand as $card) {
			$html .= $card->GetCardAsCSS();
		}
		return $html;
	}

}

?>