C# String

Ru Ru

Solid State Member
Messages
10
Location
UK
People, I need some help with using string to make a game board for chess, or in fact any board it.

The idea I have is that the board needs to be represented as string and use strings to find out elements and insert the piece and so on. Need some help on this though since my programming isn't all that great. It's going to be written in C#

Can any of you give me a hand. Thanks
 
Sounds a bit like a homework assignment.

Do you have a specific question about implementing with strings?

Maybe use a List<string> or array of strings.
 
People, I need some help with using string to make a game board for chess, or in fact any board it.

The idea I have is that the board needs to be represented as string and use strings to find out elements and insert the piece and so on. Need some help on this though since my programming isn't all that great. It's going to be written in C#

Can any of you give me a hand. Thanks

Can you be a little more specific? Like is it going to be graphical or just lines and letters representing the pieces or what exactly?
 
Sounds a bit like a homework assignment.

Do you have a specific question about implementing with strings?

Maybe use a List<string> or array of strings.

This.
Personally I'd use a 2-D array because it's easier to visualize for me.. However, the more dimensions you have, the more complicated it is to pass between functions... pointers to pointers (ad infinitum, depending on how many dimensions you have) :tongue:
 
This.
Personally I'd use a 2-D array because it's easier to visualize for me.. However, the more dimensions you have, the more complicated it is to pass between functions... pointers to pointers (ad infinitum, depending on how many dimensions you have) :tongue:

C# doesn't have pointers :p (well it does... but technically everything is already a pointer).

Arrays? Psh, Lists are where it's at! :p

Fun when you have List<List<string>> haha.
 
List<List<List<List<List<List<string>>>>>>
How would that even work...
 
Fun?!...Try horrible hahaha

I've had to do it before lol. It's not too bad when using Visual Studio... just interesting to keep track of which list you're actually interacting with lol. Not much different from a 2D array though honestly... IMO it's easier to manage data since it's dynamic and you can add/remove elements at will.

But that's just me :p.
 
I've had to do it before lol. It's not too bad when using Visual Studio... just interesting to keep track of which list you're actually interacting with lol. Not much different from a 2D array though honestly... IMO it's easier to manage data since it's dynamic and you can add/remove elements at will.

But that's just me :p.

Yeah I believe that. lol a lot of programming is "ugly" but there is no way around it most of the time haha
 
Back
Top Bottom