Giter Site home page Giter Site logo

tynab / solitaire-game Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 2.0 29.12 MB

Solitaire Game

Home Page: https://tynab.github.io/Solitaire-Game/

C# 69.11% ShaderLab 26.32% HLSL 4.58%
card card-game cards-game chsarp cs game game-card game-cards game-unity solitaire solitaire-card-game solitaire-game tynab unity unity-engine unity-game unity3d webgl yan game-solitaire

solitaire-game's Introduction

SOLITAIRE GAME

Solitaire, also known as Klondike or Patience, is a classic card game that has been a popular pastime for generations. This single-player game is known for its simplicity and addictive nature, making it a favorite for those looking to pass the time or challenge their strategic thinking.

The objective of Solitaire is to move all the cards from a shuffled deck into four foundation piles, one for each suit (hearts, diamonds, clubs, and spades). The cards must be arranged in ascending order, starting with the Ace and ending with the King.

The game begins with seven tableau piles, which are initially dealt with a varying number of face-down and face-up cards. Players can move cards between tableau piles, either building them in descending numerical order and alternating colors, or by transferring a sequence of cards to an open foundation pile. Empty tableau slots can be filled with a King or any valid sequence of cards.

Solitaire is a game of strategy, requiring careful planning and decision-making. Success in Solitaire depends on your ability to create sequences, uncover hidden cards, and ultimately, move all the cards to the foundation piles. The game is won when all four foundation piles are complete, with each suit's cards arranged in ascending order.

Whether you're a casual player or a Solitaire enthusiast, this timeless game offers hours of entertainment and a satisfying sense of accomplishment when you successfully solve the puzzle. Solitaire is available on a variety of platforms, from physical card decks to computer and mobile applications, making it accessible to players of all ages and skill levels.

LINK DEMO

IMAGE DEMO

CODE DEMO

public bool StackAble(GameObject selected)
{
    var s1 = Slot.GetComponent<Selectable>();
    var s2 = selected.GetComponent<Selectable>();

    return !s2.IsDeckPile && (s2.Top ? (s1.Suit == s2.Suit || s1.Values is 1 && s2.Suit is null) && s1.Values == s2.Values + 1 : s1.Values == s2.Values - 1 && s1.Suit is not "C" and not "S" != s2.Suit is not "C" and not "S");
}

solitaire-game's People

Contributors

tynab avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

kcbf armelhbobdad

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.