Exemplo n.º 1
0
        /*<summary>
         * Draws a small field, showing the attacks made and the locations of the player's ships
         *</summary>
         *<param name="grid">the grid to show</param>
         *<param name="thePlayer">the player to show the ships of</param>
         */
        public static void DrawSmallField(ISeaGrid grid, Player thePlayer)
        {
            const int SMALL_FIELD_TOP         = 373;
            int       SMALL_FIELD_LEFT        = 39;
            const int SMALL_FIELD_HEIGHT      = 166;
            int       SMALL_FIELD_WIDTH       = 166;
            const int SMALL_FIELD_CELL_HEIGHT = 13;
            int       SMALL_FIELD_CELL_WIDTH  = 13;
            const int SMALL_FIELD_CELL_GAP    = 4;

            UtilityFunctions.DrawCustomField(grid, thePlayer, true, true, SMALL_FIELD_LEFT, SMALL_FIELD_TOP, SMALL_FIELD_WIDTH, SMALL_FIELD_HEIGHT, SMALL_FIELD_CELL_WIDTH, SMALL_FIELD_CELL_HEIGHT, SMALL_FIELD_CELL_GAP);
        }
Exemplo n.º 2
0
 /*<summary>
  * Draws a large field using the grid and the indicated player's ships.
  *</summary>
  *<param name="grid">the grid to draw</param>
  *<param name="thePlayer">the players ships to show</param>
  *<param name="showShips">indicates if the ships should be shown</param>
  */
 public static void DrawField(ISeaGrid grid, Player thePlayer, bool showShips)
 {
     UtilityFunctions.DrawCustomField(grid, thePlayer, false, showShips, FIELD_LEFT, FIELD_TOP, FIELD_WIDTH, FIELD_HEIGHT, CELL_WIDTH, CELL_HEIGHT, CELL_GAP);
 }