Skip to content

Latest commit

 

History

History
91 lines (57 loc) · 3.54 KB

README.md

File metadata and controls

91 lines (57 loc) · 3.54 KB

playing-cards

MIT License badge

playing-cards-demo

----------------------------------------

Program for simulating playing with a deck of cards. Written in Go.

The following Go Standard Library packages are imported:

  • fmt
  • io/ioutil
  • math/rand
  • os
  • strings
  • time

Table of Contents

Usage

In order to use application, you must download this repository and run program in terminal.

Installation

To install:

  • download latest version of Go on your machine
  • download, fork, or clone this repository
  • open terminal in application root directory
  • enter,go run main.go deck.go

a deck of 16 cards randomly shuffled shall be printed to the console

Notes

The application as written, uses the newDeck(), print() and shuffle() methods.

In order the use the deal(), saveToFile() and newDeckFromFile() methods, one must modify the main.go file and call the methods as desired.

Testing

To run tests:

  • after installation, open terminal in application root directory
  • enter, go test

a pass or fail message will be printed to terminal console

License

MIT License

Copyright (c) 2022 Anthony Pena

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation fil (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge,publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Version History

Contributing

Please refer to the Contributor Covenenant for guidelines on contributing on this project.

Questions

For any inquiries or questions, please contact Anthony Pena via:

Acknowledgments

Inspiration, code snippets, etc.