A computer game like Strip Poker written in golang. This program uses a deck of cards for studying gambling or probability.
Instead of hand coding each card with text string into a map, this will help to create the cards on the fly into a slice and
want to shuffle the cards as well.
- Deal the card
- Shuffle the deck
- Save the deck in the file stored on harddisk
- Create new deck from the file
This program is written in golang using OOPs paradigm design. Although, Go doesn’t it but Go has types and methods and allows
an object-oriented style of programming, there is no type hierarchy. The concept of “interface” in Go provides a
different approach that we believe is easy to use and in some ways more general. There are also ways to embed types in other
types to provide something analogous — but not identical — to subclassing. Moreover, methods in Go are more general than in
C++ or Java: they can be defined for any sort of data, even built-in types such as plain, “unboxed” integers. They are not
restricted to structs (classes).
Leave a Reply