<?php ?> <?php class Player { public $name; public $icon; public $isWinner; public $position; public function __construct($name, $icon) { $this->name = $name; $this->icon = $icon; $this->position = 1; } } class Desk { public $cases; public $players; public $round; public function __construct($players) { 4 => 42, 16 => 8, 9 => 30, 32 => 12, 14 => 77, 62 => 19, 80 => 98, 96 => 76, 71 => 67, 48 => 73, 37 => 58, 47 => 26, 70 => 89 ); $this->players = $players; } public function getZone() { for ($i = 0; $i <= 99; $i++) $this->zone = $zone; return $this->zone; } public function getRoll() { return $roll; } public function getGame() { do { foreach ($this->players as $player) { $this->getMove($player); if ($player->isWinner == 1) { return $player->name; } echo $this->getShow(); } echo "End of $this->round round \n\n"; echo "Positions after $this->round: \n"; foreach ($this->players as $player) { echo "$player->name ($player->icon) position is: $player->position \n"; } echo "\n"; } while ($player->isWinner == 0); } public function getMove($player) { $lastPosition = $player->position; $roll = $this->getRoll(); $player->position += $roll; echo "\n Rolling the dice for $player->name ($player->icon): $roll \n"; foreach ($this->cases as $key => $value) { if ($player->position == $key) { echo "$player->name is moving from $player->position to "; $player->position = $value; echo "$player->position \n"; } } if ($lastPosition + $roll > 100) { $player->position = 100; } if ($player->position == 100) { echo "CONGRATULATION: $player->name ($player->icon) - THE WINNER!!! \n"; $player->isWinner = 1; return $player->isWinner; } } public function getShow() { $this->getZone(); foreach ($this->zone as &$square) { foreach ($this->players as $player) { if ($square == $player->position) { $square .= $player->icon; } } } $text = ''; $k = 1; foreach ($this->zone as $position) { echo " $position "; echo "\n"; $k++; } } } $player1 = new Player('Player1', '@'); $player2 = new Player('Player2', '#'); $player3 = new Player('Player3', '*'); $player4 = new Player('Player4', '%'); $player1, $player2, $player3, $player4 ); $desk = new Desk($players); function padRight($string) { if ($count <= 0) { return $string; } return $space . $string . $space; } $desk->getGame();
Standard input is empty
Rolling the dice for Player1 (@): 4 1#*% 2 3 4 5@ 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 Rolling the dice for Player2 (#): 4 1*% 2 3 4 5@# 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 Rolling the dice for Player3 (*): 1 1% 2* 3 4 5@# 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 Rolling the dice for Player4 (%): 4 1 2* 3 4 5@#% 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 __________________________________________________ End of 1 round Positions after 1: Player1 (@) position is: 5 Player2 (#) position is: 5 Player3 (*) position is: 2 Player4 (%) position is: 5 Rolling the dice for Player1 (@): 1 1 2* 3 4 5#% 6@ 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 Rolling the dice for Player2 (#): 6 1 2* 3 4 5% 6@ 7 8 9 10 11# 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 Rolling the dice for Player3 (*): 2 Player3 is moving from 4 to 42 1 2 3 4 5% 6@ 7 8 9 10 11# 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42* 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 Rolling the dice for Player4 (%): 4 Player4 is moving from 9 to 30 1 2 3 4 5 6@ 7 8 9 10 11# 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30% 31 32 33 34 35 36 37 38 39 40 41 42* 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 __________________________________________________ End of 2 round Positions after 2: Player1 (@) position is: 6 Player2 (#) position is: 11 Player3 (*) position is: 42 Player4 (%) position is: 30 Rolling the dice for Player1 (@): 5 1 2 3 4 5 6 7 8 9 10 11@# 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30% 31 32 33 34 35 36 37 38 39 40 41 42* 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 Rolling the dice for Player2 (#): 2 1 2 3 4 5 6 7 8 9 10 11@ 12 13# 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30% 31 32 33 34 35 36 37 38 39 40 41 42* 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 Rolling the dice for Player3 (*): 4 1 2 3 4 5 6 7 8 9 10 11@ 12 13# 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30% 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46* 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 Rolling the dice for Player4 (%): 6 1 2 3 4 5 6 7 8 9 10 11@ 12 13# 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36% 37 38 39 40 41 42 43 44 45 46* 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 __________________________________________________ End of 3 round Positions after 3: Player1 (@) position is: 11 Player2 (#) position is: 13 Player3 (*) position is: 46 Player4 (%) position is: 36 Rolling the dice for Player1 (@): 2 1 2 3 4 5 6 7 8 9 10 11 12 13@# 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36% 37 38 39 40 41 42 43 44 45 46* 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 Rolling the dice for Player2 (#): 3 Player2 is moving from 16 to 8 1 2 3 4 5 6 7 8# 9 10 11 12 13@ 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36% 37 38 39 40 41 42 43 44 45 46* 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 Rolling the dice for Player3 (*): 5 1 2 3 4 5 6 7 8# 9 10 11 12 13@ 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36% 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51* 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 Rolling the dice for Player4 (%): 5 1 2 3 4 5 6 7 8# 9 10 11 12 13@ 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41% 42 43 44 45 46 47 48 49 50 51* 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 __________________________________________________ End of 4 round Positions after 4: Player1 (@) position is: 13 Player2 (#) position is: 8 Player3 (*) position is: 51 Player4 (%) position is: 41 Rolling the dice for Player1 (@): 1 Player1 is moving from 14 to 77 1 2 3 4 5 6 7 8# 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41% 42 43 44 45 46 47 48 49 50 51* 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77@ 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 Rolling the dice for Player2 (#): 4 1 2 3 4 5 6 7 8 9 10 11 12# 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41% 42 43 44 45 46 47 48 49 50 51* 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77@ 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 Rolling the dice for Player3 (*): 4 1 2 3 4 5 6 7 8 9 10 11 12# 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41% 42 43 44 45 46 47 48 49 50 51 52 53 54 55* 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77@ 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 Rolling the dice for Player4 (%): 1 1 2 3 4 5 6 7 8 9 10 11 12# 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42% 43 44 45 46 47 48 49 50 51 52 53 54 55* 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77@ 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 __________________________________________________ End of 5 round Positions after 5: Player1 (@) position is: 77 Player2 (#) position is: 12 Player3 (*) position is: 55 Player4 (%) position is: 42 Rolling the dice for Player1 (@): 2 1 2 3 4 5 6 7 8 9 10 11 12# 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42% 43 44 45 46 47 48 49 50 51 52 53 54 55* 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79@ 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 Rolling the dice for Player2 (#): 4 Player2 is moving from 16 to 8 1 2 3 4 5 6 7 8# 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42% 43 44 45 46 47 48 49 50 51 52 53 54 55* 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79@ 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 Rolling the dice for Player3 (*): 2 1 2 3 4 5 6 7 8# 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42% 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57* 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79@ 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 Rolling the dice for Player4 (%): 4 1 2 3 4 5 6 7 8# 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46% 47 48 49 50 51 52 53 54 55 56 57* 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79@ 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 __________________________________________________ End of 6 round Positions after 6: Player1 (@) position is: 79 Player2 (#) position is: 8 Player3 (*) position is: 57 Player4 (%) position is: 46 Rolling the dice for Player1 (@): 4 1 2 3 4 5 6 7 8# 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46% 47 48 49 50 51 52 53 54 55 56 57* 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83@ 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 Rolling the dice for Player2 (#): 1 Player2 is moving from 9 to 30 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30# 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46% 47 48 49 50 51 52 53 54 55 56 57* 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83@ 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 Rolling the dice for Player3 (*): 5 Player3 is moving from 62 to 19 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19* 20 21 22 23 24 25 26 27 28 29 30# 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46% 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83@ 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 Rolling the dice for Player4 (%): 4 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19* 20 21 22 23 24 25 26 27 28 29 30# 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50% 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83@ 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 __________________________________________________ End of 7 round Positions after 7: Player1 (@) position is: 83 Player2 (#) position is: 30 Player3 (*) position is: 19 Player4 (%) position is: 50 Rolling the dice for Player1 (@): 5 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19* 20 21 22 23 24 25 26 27 28 29 30# 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50% 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88@ 89 90 91 92 93 94 95 96 97 98 99 100 Rolling the dice for Player2 (#): 5 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19* 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35# 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50% 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88@ 89 90 91 92 93 94 95 96 97 98 99 100 Rolling the dice for Player3 (*): 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20* 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35# 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50% 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88@ 89 90 91 92 93 94 95 96 97 98 99 100 Rolling the dice for Player4 (%): 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20* 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35# 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52% 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88@ 89 90 91 92 93 94 95 96 97 98 99 100 __________________________________________________ End of 8 round Positions after 8: Player1 (@) position is: 88 Player2 (#) position is: 35 Player3 (*) position is: 20 Player4 (%) position is: 52 Rolling the dice for Player1 (@): 4 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20* 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35# 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52% 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92@ 93 94 95 96 97 98 99 100 Rolling the dice for Player2 (#): 5 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20* 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40# 41 42 43 44 45 46 47 48 49 50 51 52% 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92@ 93 94 95 96 97 98 99 100 Rolling the dice for Player3 (*): 6 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26* 27 28 29 30 31 32 33 34 35 36 37 38 39 40# 41 42 43 44 45 46 47 48 49 50 51 52% 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92@ 93 94 95 96 97 98 99 100 Rolling the dice for Player4 (%): 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26* 27 28 29 30 31 32 33 34 35 36 37 38 39 40# 41 42 43 44 45 46 47 48 49 50 51 52 53 54% 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92@ 93 94 95 96 97 98 99 100 __________________________________________________ End of 9 round Positions after 9: Player1 (@) position is: 92 Player2 (#) position is: 40 Player3 (*) position is: 26 Player4 (%) position is: 54 Rolling the dice for Player1 (@): 4 Player1 is moving from 96 to 76 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26* 27 28 29 30 31 32 33 34 35 36 37 38 39 40# 41 42 43 44 45 46 47 48 49 50 51 52 53 54% 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76@ 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 Rolling the dice for Player2 (#): 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26* 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42# 43 44 45 46 47 48 49 50 51 52 53 54% 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76@ 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 Rolling the dice for Player3 (*): 6 Player3 is moving from 32 to 12 1 2 3 4 5 6 7 8 9 10 11 12* 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42# 43 44 45 46 47 48 49 50 51 52 53 54% 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76@ 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 Rolling the dice for Player4 (%): 5 1 2 3 4 5 6 7 8 9 10 11 12* 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42# 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59% 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76@ 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 __________________________________________________ End of 10 round Positions after 10: Player1 (@) position is: 76 Player2 (#) position is: 42 Player3 (*) position is: 12 Player4 (%) position is: 59 Rolling the dice for Player1 (@): 4 Player1 is moving from 80 to 98 1 2 3 4 5 6 7 8 9 10 11 12* 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42# 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59% 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98@ 99 100 Rolling the dice for Player2 (#): 3 1 2 3 4 5 6 7 8 9 10 11 12* 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45# 46 47 48 49 50 51 52 53 54 55 56 57 58 59% 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98@ 99 100 Rolling the dice for Player3 (*): 6 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18* 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45# 46 47 48 49 50 51 52 53 54 55 56 57 58 59% 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98@ 99 100 Rolling the dice for Player4 (%): 1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18* 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45# 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60% 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98@ 99 100 __________________________________________________ End of 11 round Positions after 11: Player1 (@) position is: 98 Player2 (#) position is: 45 Player3 (*) position is: 18 Player4 (%) position is: 60 Rolling the dice for Player1 (@): 3 CONGRATULATION: Player1 (@) - THE WINNER!!!