FSplayer | A simaple video player with FFmpeg and SDL2.0 | Video Utils library
kandi X-RAY | FSplayer Summary
kandi X-RAY | FSplayer Summary
A simaple video player with FFmpeg and SDL2.0.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of FSplayer
FSplayer Key Features
FSplayer Examples and Code Snippets
Community Discussions
Trending Discussions on FSplayer
QUESTION
I'm writing a card game. I've seen examples where programmers will separate their struct
from a service
.
I'm not sure if I should also be doing the same.
But my question is -- should I be separating the struct from logical functions; or is it okay to put them together?
My code is as such:
...ANSWER
Answered 2017-May-09 at 12:08It's not necessary to separate your both struct and class, especially when they only exist in one view/controller/etc and cooperate only with each other. Dividing above into two files only increases readability. When there is a lot of classes that use your model (in your case struct FSCard
) it's advisable, because you can easily find and check your struct for reading only or modifying it.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install FSplayer
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page