11/*
22 * COPYRIGHT: See COPYING in the top level directory
33 * PROJECT: Solaris
4- * FILE: Solaris/ Helper.cs
4+ * FILE: Helper.cs
55 * PURPOSE: Helper class for image processing and map rendering.
66 * PROGRAMMER: Peter Geinitz (Wayfarer)
77 */
@@ -21,7 +21,7 @@ namespace Solaris;
2121/// <summary>
2222/// Helper class that manages image generation tasks.
2323/// </summary>
24- internal static class Helper
24+ internal static partial class Helper
2525{
2626 /// <summary>
2727 /// The render
@@ -41,7 +41,7 @@ internal static class Helper
4141 /// <param name="textureSize">Size of the texture.</param>
4242 /// <param name="textures">The textures.</param>
4343 /// <param name="map">The map.</param>
44- /// <returns></returns>
44+ /// <returns>Generated Board as Imaage </returns>
4545 internal static Bitmap GenerateImage (
4646 int width , int height , int textureSize ,
4747 Dictionary < int , Texture > textures ,
@@ -117,7 +117,7 @@ internal static ImageSource GenerateGrid(int width, int height, int textureSize)
117117 /// <param name="height">The height.</param>
118118 /// <param name="textureSize">Size of the texture.</param>
119119 /// <param name="padding">The padding.</param>
120- /// <returns></returns>
120+ /// <returns>Image with Numbers overlayed. </returns>
121121 internal static ImageSource GenerateNumbers ( int width , int height , int textureSize , int padding = 2 )
122122 {
123123 using var bitmap = new Bitmap ( width * textureSize , height * textureSize ) ;
@@ -147,7 +147,7 @@ internal static ImageSource GenerateNumbers(int width, int height, int textureSi
147147 /// </summary>
148148 /// <param name="map">The map.</param>
149149 /// <param name="idTexture">The identifier texture.</param>
150- /// <returns></returns>
150+ /// <returns>Generate a new Bitmap for the new Map </returns>
151151 internal static MapChangeResult AddTile (
152152 Dictionary < int , List < int > > ? map , KeyValuePair < int , int > idTexture )
153153 {
@@ -163,7 +163,7 @@ internal static MapChangeResult AddTile(
163163 /// <param name="map">The map.</param>
164164 /// <param name="textures">The textures.</param>
165165 /// <param name="idLayer">The identifier layer.</param>
166- /// <returns></returns>
166+ /// <returns>Remove a Tile from the map. </returns>
167167 internal static MapChangeResult RemoveTile (
168168 Dictionary < int , List < int > > ? map , Dictionary < int , Texture > textures , KeyValuePair < int , int > idLayer )
169169 {
@@ -201,7 +201,7 @@ internal static MapChangeResult RemoveTile(
201201 /// <param name="textures">The textures.</param>
202202 /// <param name="layer">The layer.</param>
203203 /// <param name="idTile">The identifier tile.</param>
204- /// <returns></returns>
204+ /// <returns>Add an Image to the image Layer </returns>
205205 public static Bitmap ? AddDisplay (
206206 int width , int textureSize , Dictionary < int , Texture > textures , Bitmap ? layer ,
207207 KeyValuePair < int , int > idTile )
@@ -215,8 +215,13 @@ internal static MapChangeResult RemoveTile(
215215 }
216216
217217 /// <summary>
218- /// Removes a tile image from the display layer.
218+ /// Removes a tile image from the display layer.
219219 /// </summary>
220+ /// <param name="width">The width.</param>
221+ /// <param name="textureSize">Size of the texture.</param>
222+ /// <param name="layer">The layer.</param>
223+ /// <param name="position">The position.</param>
224+ /// <returns>Remove areal from Image</returns>
220225 public static Bitmap RemoveDisplay ( int width , int textureSize , Bitmap ? layer , int position )
221226 {
222227 var x = position % width * textureSize ;
@@ -226,8 +231,15 @@ public static Bitmap RemoveDisplay(int width, int textureSize, Bitmap? layer, in
226231 }
227232
228233 /// <summary>
229- /// Displays movement animation.
234+ /// Displays movement animation.
230235 /// </summary>
236+ /// <param name="aurora">The aurora.</param>
237+ /// <param name="steps">The steps.</param>
238+ /// <param name="avatar">The avatar.</param>
239+ /// <param name="width">The width.</param>
240+ /// <param name="height">The height.</param>
241+ /// <param name="textureSize">Size of the texture.</param>
242+ /// <returns>Status of the animation.</returns>
231243 internal static async Task DisplayMovement ( Aurora aurora , IEnumerable < int > steps , Bitmap ? avatar ,
232244 int width , int height , int textureSize )
233245 {
@@ -247,18 +259,18 @@ internal static async Task DisplayMovement(Aurora aurora, IEnumerable<int> steps
247259 }
248260
249261 /// <summary>
250- /// Moves the avatar to a new position with animation.
262+ /// Moves the avatar to a new position with animation.
251263 /// </summary>
264+ /// <param name="x">The x.</param>
265+ /// <param name="y">The y.</param>
266+ /// <param name="background">The background.</param>
267+ /// <param name="avatar">The avatar.</param>
268+ /// <param name="sleep">The sleep.</param>
269+ /// <returns>Status of the animation.</returns>
252270 private static async Task < bool > MoveAvatar ( int x , int y , Bitmap ? background , Bitmap ? avatar , int sleep )
253271 {
254272 Render . CombineBitmap ( background , avatar , x , y ) ;
255273 await Task . Delay ( sleep ) ;
256274 return true ;
257275 }
258-
259- /// <inheritdoc />
260- /// <summary>
261- /// Return type for map manipulation methods.
262- /// </summary>
263- internal readonly record struct MapChangeResult ( bool Changed , Dictionary < int , List < int > > ? Map ) ;
264276}
0 commit comments