Giter Club home page Giter Club logo

c-card-game's Introduction

C-Card-Game

A card game written for an assignment IT6253 Assignment 2

The Aim of this game is to last longer than your opponent

The Program builds a deck of cards (default size of 52) Each card Has the following attributes:

  • Id
  • Value
  • Suit
  • Status

When the program is launched, a simple GUI is loaded and a deck is build as an array of cards

When the 'Deal' button is pressed, the array of cards is shuffled and dealed to 2 players (half the deck each)

Player one starts - On the first round, after clicking the 'Player 1 turn' button, the card at the top of their pile is selected.

Player 2 then clicks their button. The program will then select the top most card that is either 1 number higher, or one number lower than the value of the last played card. The suit does not matter. 11, 12, and 13, represent the Jack, Queen, and King respectively. A card higher than 13, loops round to a 1, and vice-versa.

The two players then take turns clicking their buttons until one player no longer has a card to play. The last person who plays a card is the winner.

c-card-game's People

Contributors

thecrowsjoker avatar

Watchers

 avatar  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.