fork download
  1. <?php
  2. header("Content-Type: text/plain; charset=utf-8");
  3. ?>
  4.  
  5. <?php
  6. class Player
  7. {
  8. public $name;
  9. public $icon;
  10. public $x;
  11. public $y;
  12. public $isWinner;
  13. public $position;
  14. public function __construct($name, $icon)
  15. {
  16. $this->name = $name;
  17. $this->icon = $icon;
  18. $this->x = 1;
  19. $this->y = 0;
  20. $this->position = 1;
  21. }
  22. public function getMove()
  23. {
  24. $round = 1;
  25. $roll = mt_rand(1, 6);
  26. $lastX = $this->x;
  27. $lastY = $this->y;
  28. $this->x = $this->x + $roll;
  29. $position = $this->y * 10 + $this->x;
  30. $this->position = $position;
  31. echo "Rolling the dice for $this->name ($this->icon): $roll \n";
  32. if ($position < 100) {
  33.  
  34. $length = 10 - $lastX;
  35.  
  36. if ($length < $roll) {
  37. $roll = $roll - $length;
  38. $this->x = $roll;
  39. $this->y = $this->y + 1;
  40. }
  41. if (100 - $position < $roll) {
  42. $position = 100;
  43. $this->position = $position;
  44. }
  45. switch ($position) {
  46. case 4:
  47. echo "Congratulation: $this->name ($this->icon) is moving from $this->y$this->x ";
  48. $this->x = 2;
  49. $this->y = 4;
  50. $this->position = 42;
  51. echo "to new position $this->y$this->x \n";
  52. break;
  53. case 16:
  54. echo "Sorry but $this->name ($this->icon) is moving from $this->y$this->x ";
  55. $this->x = 8;
  56. $this->y = 0;
  57. echo "to new position is $this->y$this->x \n";
  58. $this->position = 8;
  59. break;
  60. case 9:
  61. echo "Congratulation: $this->name ($this->icon) is moving from $this->y$this->x ";
  62. $this->x = 10;
  63. $this->y = 3;
  64. $this->position = 30;
  65. echo "to new position $this->position \n";
  66. break;
  67. case 32:
  68. echo "Sorry but $this->name ($this->icon) is moving from $this->y$this->x ";
  69. $this->x = 2;
  70. $this->y = 1;
  71. $this->position = 12;
  72. echo "to new position $this->y$this->x \n";
  73. break;
  74. case 14:
  75. echo "Congratulation: $this->name ($this->icon) is moving from $this->y$this->x ";
  76. $this->x = 7;
  77. $this->y = 7;
  78. $this->position = 77;
  79. echo "to new position $this->y$this->x \n";
  80. break;
  81. case 62:
  82. echo "Sorry but $this->name ($this->icon) is moving from $this->y$this->x ";
  83. $this->x = 9;
  84. $this->y = 1;
  85. $this->position = 19;
  86. echo "to new position $this->y$this->x \n";
  87. break;
  88. case 80:
  89. echo "Congratulation: $this->name ($this->icon) is moving from $this->y$this->x ";
  90. $this->x = 8;
  91. $this->y = 9;
  92. $this->position = 98;
  93. echo "to new position $this->y$this->x \n";
  94. break;
  95. case 96:
  96. echo "Sorry but $this->name ($this->icon) is moving from $this->y$this->x ";
  97. $this->x = 6;
  98. $this->y = 7;
  99. $this->position = 76;
  100. echo "to new position $this->y$this->x \n";
  101. break;
  102. case 71:
  103. echo "Sorry but $this->name ($this->icon) is moving from $this->y$this->x ";
  104. $this->x = 7;
  105. $this->y = 6;
  106. $this->position = 67;
  107. echo "to new position $this->y$this->x \n";
  108. break;
  109. case 48:
  110. echo "Congratulation: $this->name ($this->icon) is moving from $this->y$this->x ";
  111. $this->x = 3;
  112. $this->y = 7;
  113. $this->position = 73;
  114. echo "to new position $this->y$this->x \n";
  115. break;
  116. case 37:
  117. echo "Congratulation: $this->name ($this->icon) is moving from $this->y$this->x ";
  118. $this->x = 8;
  119. $this->y = 5;
  120. $this->position = 58;
  121. echo "to new position $this->y$this->x \n";
  122. break;
  123. case 47:
  124. echo "Sorry but $this->name ($this->icon) is moving from $this->y$this->x ";
  125. $this->x = 6;
  126. $this->y = 2;
  127. $this->position = 26;
  128. echo "to new position $this->y$this->x \n";
  129. break;
  130. case 70:
  131. echo "Congratulation: $this->name ($this->icon) is moving from $this->y$this->x ";
  132. $this->x = 9;
  133. $this->y = 8;
  134. $this->position = 89;
  135. echo "to new position $this->y$this->x \n";
  136. break;
  137. default:
  138. echo "$this->name new position is $position \n";
  139. }
  140. } else {
  141. echo "CONGRATULATION: $this->name ($this->icon) - THE WINNER!!! \n";
  142. $this->position = 100;
  143. $this->x = 10;
  144. $this->y = 9;
  145. $this->isWinner = 1;
  146. return $this->isWinner;
  147. }
  148.  
  149. }
  150.  
  151. }
  152. $player1 = new Player('Player1', '@');
  153. $player2 = new Player('Player2', '#');
  154. $player3 = new Player('Player3', '*');
  155. $player4 = new Player('Player4', '%');
  156.  
  157. $players = array(
  158. $player1,
  159. $player2,
  160. $player3,
  161. $player4
  162. );
  163. $round = 1;
  164. function padRight($string)
  165. {
  166. $count = 50 - mb_strlen($string);
  167. if ($count <= 0) {
  168. return $string;
  169. }
  170. $space = str_repeat(' ', $count / 2);
  171. return $space . $string . $space;
  172. }
  173. function getShow($players)
  174. {
  175. $zone = array();
  176. $k = 1;
  177. for ($i = 0; $i <= 9; $i++) {
  178. for ($j = 1; $j <= 10; $j++) {
  179. $zone[$i][$j] = $k++;
  180. }
  181. }
  182.  
  183. foreach ($players as $player) {
  184. $zone[$player->y][$player->x] .= $player->icon;
  185. }
  186.  
  187. $text = '';
  188. foreach ($zone as $line) {
  189. $string = '';
  190. foreach ($line as $position) {
  191. $string .= " $position ";
  192. }
  193. $text .= padRight($string) . "\n";
  194. }
  195. return $text;
  196. }
  197.  
  198.  
  199. function getGame($array)
  200. {
  201. global $round;
  202. global $players;
  203. do {
  204. foreach ($array as $player) {
  205.  
  206. $player->getMove();
  207.  
  208. if ($player->isWinner == 1) {
  209. return $player->name;
  210. }
  211. echo getShow($players);
  212. }
  213.  
  214. echo str_repeat('_', 50) . "\n";
  215. echo "End of $round round \n\n";
  216. $round++;
  217. } while ($player->isWinner == 0);
  218.  
  219. }
  220. getGame($players);
  221.  
  222.  
  223. echo getShow($players);
  224.  
Success #stdin #stdout 0.02s 20568KB
stdin
Standard input is empty
stdout
Rolling the dice for Player1 (@): 2 
Player1 new position is 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 Player2 (#): 3 
Congratulation: Player2 (#) is moving from 04 to new position  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 Player3 (*): 4 
Player3 new position is 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 (%): 2 
Player4 new position is 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     
__________________________________________________
End of 1 round 

Rolling the dice for Player1 (@): 1 
Congratulation: Player1 (@) is moving from 04 to new position  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 Player2 (#): 2 
Player2 new position is 44 
         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 new position is 10 
         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 
Player4 new position is 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 2 round 

Rolling the dice for Player1 (@): 5 
Sorry but Player1 (@) is moving from 47 to new position  26 
         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 
Congratulation: Player2 (#) is moving from 48 to new position  73 
         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 new position is 15 
          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 
Player4 new position is 11 
          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 

Rolling the dice for Player1 (@): 1 
Player1 new position is 27 
          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 
Player2 new position is 79 
          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 new position is 21 
          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 
Player4 new position is 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     
__________________________________________________
End of 4 round 

Rolling the dice for Player1 (@): 6 
Player1 new position is 33 
          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 new position is 82 
          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 
Player3 new position is 25 
          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 
Sorry but Player4 (%) is moving from 16 to new position is 08 
          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 

Rolling the dice for Player1 (@): 1 
Player1 new position is 34 
          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 
Player2 new position is 88 
          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 
Player3 new position is 29 
          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 
Congratulation: Player4 (%) is moving from 14 to new position  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     
__________________________________________________
End of 6 round 

Rolling the dice for Player1 (@): 4 
Player1 new position is 38 
          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 new position is 91 
          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 new position is 31 
          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 (%): 3 
Congratulation: Player4 (%) is moving from 710 to new position  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    
__________________________________________________
End of 7 round 

Rolling the dice for Player1 (@): 6 
Player1 new position is 44 
          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 
Player2 new position is 93 
          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 new position is 36 
          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 
Player4 new position is 99 
          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 

Rolling the dice for Player1 (@): 4 
Congratulation: Player1 (@) is moving from 48 to new position  73 
          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 
Player2 new position is 100 
          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 new position is 41 
          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 (%): 3 
CONGRATULATION: Player4 (%) - THE WINNER!!! 
          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%