|
|
|
@ -240,11 +240,54 @@ class Deck {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}elseif ($changes === 'dealHS3') {
|
|
|
|
|
$colors = array('green', 'red', 'purple', 'lightblue');
|
|
|
|
|
$shapes = array('oval', 'diamond', 'wave', 'rectangle');
|
|
|
|
|
$fills = array('solid', 'stripped', 'open','quadrillage');
|
|
|
|
|
$borders = array ('plein','point','rond','zigzag');
|
|
|
|
|
$numbers = array(1, 2, 3, 4);
|
|
|
|
|
|
|
|
|
|
$index3 = 1;
|
|
|
|
|
|
|
|
|
|
foreach ($colors as $color) {
|
|
|
|
|
foreach ($shapes as $shape) {
|
|
|
|
|
foreach ($fills as $fill) {
|
|
|
|
|
foreach ($borders as $border){
|
|
|
|
|
foreach ($numbers as $number) {
|
|
|
|
|
$cardAttributes = new CardAttributes($color, $shape, $fill, $border, $number, $index3);
|
|
|
|
|
$card = new Card($cardAttributes, $this);
|
|
|
|
|
$index3++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
} elseif ($changes === 'dealHS4') {
|
|
|
|
|
$colors = array('green', 'red', 'purple', 'lightblue', 'yellow');
|
|
|
|
|
$shapes = array('oval', 'diamond', 'wave', 'rectangle','triangle');
|
|
|
|
|
$fills = array('solid', 'stripped', 'open', 'quadrillage','pointille');
|
|
|
|
|
$borders = array('plein', 'point', 'rond', 'zigzag','hachure');
|
|
|
|
|
$numbers = array(1, 2, 3, 4, 5);
|
|
|
|
|
|
|
|
|
|
$index4 = 1;
|
|
|
|
|
|
|
|
|
|
foreach ($colors as $color) {
|
|
|
|
|
foreach ($shapes as $shape) {
|
|
|
|
|
foreach ($fills as $fill) {
|
|
|
|
|
foreach ($borders as $border) {
|
|
|
|
|
foreach ($numbers as $number) {
|
|
|
|
|
$cardAttributes = new CardAttributes($color, $shape, $fill, $border,$number, $index4);
|
|
|
|
|
$card = new Card($cardAttributes, $this);
|
|
|
|
|
$index4++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
public function removeSet($cards) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private function shuffle() {
|
|
|
|
|
shuffle($this->cards);
|
|
|
|
@ -275,4 +318,7 @@ class Deck {
|
|
|
|
|
public function sixMore() {
|
|
|
|
|
return array_chop($this->cards, 6);
|
|
|
|
|
}
|
|
|
|
|
public function eightMore() {
|
|
|
|
|
return array_chop($this->cards, 8);
|
|
|
|
|
}
|
|
|
|
|
}
|