/// <summary> /// Handles the click method specifically in design mode. /// </summary> /// <param name="mapLocation">The map location clicked.</param> private void HandleDesignClick(MapLocation mapLocation) { List <Entity> entitys = mapLocation.GetEntitys(); EntityType entityType = ((DesignForm)SokobanProgram.getFormFromState(GameState.DESIGN)).GetToolType(); if (entityType == EntityType.HERO && HasEntity(EntityType.HERO)) { MessageBox.Show("There can only be one Hero on the game board."); return; } if (entitys.Count > 0) { mapLocation.ClearEntities(); } Entity entity = Entity.GetEntityByType(entityType); if (entity == null) { return; } mapLocation.AddEntity(entity); }