-1

I've been learning Python recently. As it's a relative joy to use, I've decided to start with that. I've done coding in college. Even though it was a decade ago, I still have knowledge of functions, flow control, scope, OOP, etc. (in languages such as Perl, Java, C, and C++) such that that should give me a jump start, even though I'll likely have to look up a bunch of stuff when hurdles present themselves. I was thinking about implementing a board game without AI (with a solitaire mode, or played exclusively that way).

Would it be a "waste of time" so to speak if my first program were completely text based? The advantage here is I can get down to coding right away. Is it worth going through this experience? OTOH, I'll want to learn to do GUIs at some point, as it makes it much more appealing and more true to the real deal.

ackmondual
  • 385
  • 3
  • 12

1 Answers1

1

It is not a waste of time at all. In fact, most of the code can be the same for both the GUI-based and text-based game. Write your game logic separately from your code that presents the game and handles user input. This way, when you finish the text-based game, the visual display is the only thing you need to write to finish the GUI-based version.

What you are doing here is avoiding coupling between the game logic and the presentation layer.

skyler
  • 1,487
  • 1
  • 10
  • 23