❔ How do I refactor this?
I am working with a grid of tiles, each tile has an int, which is made up of 4 bytes which represent what value in an enum each side of the tile is in.
This means I have a lot of things that need to run after a few calculations are done in a loop of adjacent tiles
here is most of the repeated code
This seems like a problem that would be solved with a functional language, but how would I allow for a few functions reuse this portion of code, adding a new bit on the end without copying and pasting all the starting stuff
SL
Sherbert Lemon•397d ago
I could pass a func into it, which it runs in there, but I don't know if it would be that clean to do so
I should have really simplified it to this so it is easier to read
A
Accord•396d ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
51KMembers
View on DiscordWant results from more Discord servers?
More Posts❔ [AvaloniaUI] Visibility of item in ListView based on conditionAn Avalonia UI application is used to manage an evidence of items. It allows the user to add items. ✅ How to structure this login/signup page layoutSo I have this mockup of the layout I want for a login/signup page in my Blazor WASM app. Pretty sta❔ I am need of help before I give up and run my code on a server instead of a serverless solution.I have create an azure function locally and i've used the selenuim webdriver package for taking scre✅ .Net Core 6 Asymmetric Encryption with custom public and private keysHello all! How can i use the `Asymmetric Encryption` in .Net 6 but choosing/importing private and pu❔ No Design in C#Instances of this bug (1)
1. View Call Stack
at System.Runtime.InteropServices.Marshal.ThrowExce❔ having issues on a reloading script on unity to reload weaponsthe code is used in a youtube video and i have pretty much copied to to get it to work but it doesnt❔ help with an exerciseI've encountered a weird problem that idk how to fix. Say we've got a string "31131123521" how do i ❔ Accessing HTTP Context at DbCommandInterceptor [.NET 7]Hi! I'm having some issues trying to access the HTTP Context at my DbCommand Interceptor class.
What