bugfix
bugfix

--- a/include/classes/anyfivecardpokerhand.php
+++ b/include/classes/anyfivecardpokerhand.php
@@ -34,8 +34,8 @@
 	}
 
 	private function generateDeckOfCards () {
-		foreach ($this->cards as $card) {
-			foreach ($this->types as $type) {
+		foreach (self::$cards as $card) {
+			foreach (self::$types as $type) {
 				$combo = $card.' '.$type;
 				array_push( $this->deckOfCards, $combo);
 		    }
@@ -91,7 +91,7 @@
 
 	public function getCardCombination ($combo) {
 		$result = array ();
-		foreach ( $this->cards as $card ) {
+		foreach ( self::$cards as $card ) {
 			$r = array_filter($combo, function ($item) use ($card) {
 			    if (stripos($item, $card) !== false) {
 			        return true;

comments