Giter Site home page Giter Site logo

solitaire's Introduction

Solitaire

Solitaire Simulator for KP Engineering Application

Download the code and run python solitaire.py to play!

To briefly explain my design choices, I decided to create a Card Object and a Pile object to more easily simulate the behavior of adding and removing cards, rather than using lists to represent each of the different piles. Creating these objects makes it easier to simulate the difference ways you can interact with a pile. My game does not test for user error, in the sense that the user can play the game with disregard for the actual rules of solitare- they can put whatever cards they want on top of one another in whichever order they want. I decided to do this in order to give players more fun- if they want to play solitaire according to the rules then they can, but they can also mess around with the game however they choose.

I decided to use python for a couple of reasons. First, I hadn't coded a real project in python in a while, so I wanted to practice with the language. Python is also my preferred language when dealing with lists, and since I knew Solitaire contained multiple lists I thought it would be the easiest language for the project.

solitaire's People

Contributors

eha505 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.