Advertisement
Guest User

Untitled

a guest
Dec 18th, 2020
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.93 KB | None | 0 0
  1. <!-- LEAGUES level1 level2 level3 -->
  2. <div id="statement_back" class="statement_back" style="display: none"></div>
  3. <div class="statement-body">
  4. <div style="color: #7cc576;
  5. background-color: rgba(124, 197, 118,.1);
  6. padding: 20px;
  7. margin-right: 15px;
  8. margin-left: 15px;
  9. margin-bottom: 10px;
  10. text-align: left;">
  11. <div style="text-align: center; margin-bottom: 6px">
  12. <img src="//cdn.codingame.com/smash-the-code/statement/league_wood_04.png" />
  13. </div>
  14.  
  15. <!-- BEGIN level1 -->
  16. <p style="text-align: center; font-weight: 700; margin-bottom: 6px;">
  17. This is a <b>league based</b> challenge.
  18. </p>
  19. <span class="statement-league-alert-content">
  20. For this challenge, multiple leagues for the same game are available. Once you have proven your skills against the
  21. first Boss, you will access a higher league and extra rules will be available.
  22. </span>
  23. <!-- END -->
  24. <!-- BEGIN level2 -->
  25. <p style="text-align: center; font-weight: 700; margin-bottom: 6px;">
  26. Summary of new rules
  27. </p>
  28. <span class="statement-league-alert-content">
  29. You can now upgrade your soldier's level!<br>
  30. <br>See the updated statement for details.</span>
  31. <!-- END -->
  32. <!-- BEGIN level3 -->
  33. <p style="text-align: center; font-weight: 700; margin-bottom: 6px;">
  34. Summary of new rules
  35. </p>
  36. <span class="statement-league-alert-content">
  37. All the rules are now unlocked!
  38. <ul>
  39. <li>You can now degrade opponent's soldier's level!</li>
  40. <li>Now your soldiers can also commit suicide</li>
  41. </ul>
  42. <br>See the updated statement for details.</span>
  43. <!-- END -->
  44. </div>
  45. <!-- GOAL -->
  46. <div class="statement-section statement-goal">
  47. <h1>
  48. <span class="icon icon-goal">&nbsp;</span>
  49. <span>The Goal</span>
  50. </h1>
  51. <div class="statement-goal-content">
  52. The goal is to finish the opponent's army or having more bucks at the end of game.
  53. </div>
  54. </div>
  55. <!-- END -->
  56. <!--- RULES --->
  57. <div class="statement-section statement-rules">
  58. <h1>
  59. <span class="icon icon-rules">&nbsp;</span>
  60. <span>Rules</span>
  61. </h1>
  62. <div>
  63. <div class="statement-rules-content">
  64. In this game you have to control your army <const>1</const>-<const>3</const> soldiers depending upon the league. To understand game mechanics you need to understand few things given below.<br><br>
  65. <hr>
  66. <br>
  67. <strong>SOLDIER</strong>
  68. <div>
  69. left to do
  70. </div><br>
  71. <strong>BLOCK</strong>
  72. <div>
  73. left to do
  74. </div><br>
  75. <strong>SOLDIER MOVABLE SITES</strong>
  76. <div>
  77. left to do.
  78. </div>
  79. <br>
  80. <strong>SOLDIER ATTACKING SITES</strong>
  81. <div>
  82. left to do.
  83. </div>
  84. <br>
  85. <hr><br>
  86. <b>ACTIONS:-</b><br>
  87. <br>
  88. <strong>MOVE</strong><br>
  89. You can use this command to move your soldiers but remember a soldier can only move at <b>SOLDIER MOVABLE SITES</b>(Explained above).The command for the action looks like - '<action>MOVE ID DIRECTION</action>' In which ID is the unique identifier of soldier and DIRECTION can be any of <const>UP DOWN LEFT RIGHT</const>.<br><br>
  90. <strong>ATTACK</strong><br>
  91. You can use this command to attack on any opponent soldier which is in range of 2 tiles and it should be one of the <b>SOLDIER ATTACKING SITES</b>(Explained above), It costs you <const>35</const> Bucks to attack. The command for the action looks like - '<action>ATTACK ID OPPONENT_SOLDIER_ID</action>' In which ID is the unique identifier of soldier and OPPONENT_SOLDIER_ID is the id of opponent soldier on which you have to attack on.<br><br>
  92. <strong>WAIT</strong><br>
  93. You can use this command to do nothing. The action looks like - '<action>WAIT</action>' your income won't be affected by this.
  94. <br><br><hr>
  95. </div>
  96. </div>
  97. </div>
  98.  
  99.  
  100. <!--- END --->
  101. <div class="statement-victory-conditions">
  102. <div class="icon victory"></div>
  103. <div class="blk">
  104. <div class="title">Victory Conditions</div>
  105. <div class="text">
  106. <ul style="padding-bottom: 0;">
  107. <li>All opponent's soldiers died.</li>
  108. <li>After <const>200</const> turns, you have more Bucks than your opponent.</li>
  109. </ul>
  110. </div>
  111. </div>
  112. </div>
  113. <div class="statement-lose-conditions">
  114. <div class="icon lose"></div>
  115. <div class="blk">
  116. <div class="title">Lose Conditions</div>
  117. <div class="text">
  118. <ul style="padding-bottom: 0;">
  119. <li>You fail to provide a valid command in time.</li>
  120. <li>You provide a unrecognized command.</li>
  121. <li>If your opponent satisfies any of victoy conditions.</li>
  122. </ul>
  123. </div>
  124. </div>
  125. </div>
  126.  
  127. <div class="statement-section statement-protocol">
  128. <h1>
  129. <span class="icon icon-protocol">&nbsp;</span>
  130. <span>Game Input</span>
  131. </h1>
  132. <!-- Protocol block -->
  133. <div class="blk">
  134. <div class="title">Initial input</div>
  135. <div class="text"><ul><li>int <var>MyID</var> - Your unique player Id which could be <const>0</const> or <const>1</const>.</li>
  136. <li>int <var>MapSize</var> - The size of board, Map = MapSize*MapSize.</li></div>
  137. </div><!-- END -->
  138.  
  139. <!-- Protocol block -->
  140. <div class="blk">
  141. <div class="title">Input per turn</div>
  142. <div class="text">
  143. <ul>
  144. <li>int <var>MyBucks</var> - Your present money or bucks.</li>
  145. <li>int <var>OppBucks</var> - Opponent's present money or bucks.</li>
  146. <li><span>Next <var>MapSize</var> * <var>MapSize</var> lines each <strong>BLOCK</strong> in the board represented by 3 integers:-</span>
  147. <br></li>
  148. <p>&nbsp&nbspint <var>BlockOwner</var> - The owner's player id of this block.</p>
  149. <p>&nbsp&nbspint <var>x</var> - This block's position x.</p>
  150. <p>&nbsp&nbspint <var>y</var> - This block's position y.</p>
  151. <br>
  152. <li>int <var>activeSoldierCount</var> - Total no. of active soldier in the game.</li>
  153. <li>Next <var>activeSoldierCount</var> lines each <strong>SOLDIER</strong> reprenseted by 6 integers:-</li>
  154. <p>&nbsp&nbsp int <var>ownerId</var> - The owner's player id of this soldier.</p>
  155. <p>&nbsp&nbsp int <var>x</var> - This soldier's position x.</p>
  156. <p>&nbsp&nbsp int <var>y</var> - This soldier's position y.</p>
  157. <p>&nbsp&nbsp int <var>soldierId</var> - The unique identifier of soldier.</p>
  158. <p>&nbsp&nbsp int <var>level</var> - Level of the soldier ignore for first league.</p>
  159. <p>&nbsp&nbsp int <var>direction</var> - The side where the soldier is facing 0 = UP, 1 = LEFT, &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp 2 = DOWN, 3 = RIGHT.</p><br>
  160. </ul><!-- END -->
  161.  
  162.  
  163. <div class="blk">
  164. <div class="title">Output</div>
  165. <div class="text">
  166. <p>A single line from one of the following commands:-
  167. <ul>
  168. <li><action>WAIT optional_message</li>
  169. <li><action>MOVE <var>SoldierID</var> <var> Direction </var> optional_message</action></li>
  170. <li><action>Attack <var>soldierID</var> <var>soldierId to attack on</var> optional_message</action></li>
  171. </ul>
  172. </div>
  173. </div>
  174. </div>
  175. <div class="blk">
  176. <div class="title">Constraints</div>
  177. <div class="text">Your code should response under <const>100 ms</const>.</div>
  178. <div class="text">Game will automatically end after <const>200 turns</const>.</div>
  179. <div class="text"><var>MapSize</var> = <const>4</const> For first league, <const>5</const> For second league, <const>10</const> For third league.</div>
  180. <div class="text"><var>MyId</var> = <const>0</const> or <const>1.</const></div>
  181. </div>
  182. </div>
  183. <!-- END -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement