Forum > Beginners

Single deminision arrays(Solved)

<< < (4/4)

MarkMLl:

--- Quote from: Thaddy on June 20, 2022, 10:24:40 pm ---
--- Quote from: JLWest on June 20, 2022, 07:12:17 pm ---No, I never considered sets. I have a array of records.

--- End quote ---
That would be ill informed for a card game (for lack of an abusive term) because for a card game you can use include/exclude, so the set will represent the cards that are still in the deck or already played. If you write a card game, sets are the way to go.
E.g. Poker can be written in less than 100 lines using sets. Bridge a bit more, but that is just handling logic, so does not count to your problem.
An array of records can be handled with e.g. the sets in rtl-generics.

--- End quote ---

Might get more complicated than a simple set if more than one deck is involved... or a game has more than one indistinguishable joker.

MarkMLl

Thaddy:

--- Quote from: MarkMLl on June 21, 2022, 11:27:06 am ---Might get more complicated than a simple set if more than one deck is involved... or a game has more than one indistinguishable joker.

MarkMLl

--- End quote ---
Actually not. The logic is the same. Only provision is to identify the deck in the record.

JLWest:
@Thaddy

No disrespect Thaddy but I don't think a bridge game came be written in less than 200 lines.

I'm at about 3,000 and and probably a 1,000 more line to finish. 

MarkMLl:

--- Quote from: JLWest on July 05, 2022, 10:18:15 pm ---No disrespect Thaddy but I don't think a bridge game came be written in less than 200 lines.

--- End quote ---

Thaddy loves a challenge :-)

MarkMLl

Navigation

[0] Message Index

[*] Previous page

Go to full version