Giter Site home page Giter Site logo

cards's Introduction

Cards

Cards is a simple Solitaire clone which was created in order to play one of my personal favorite solitaire game on any mobile device.

It was inspired by the Solitaire flash game which can be found at http://www.gamedesign.jp/flash/card/card.html

Installation

The game does not need to get installed. You can simply run this game in your browser. However, since this game comes with the full source code you can also compile it by yourself. It's even possible to build Android and iOS versions from this code.

Compilation with DWScript

The source code of this game is written in an Object Pascal dialect which can be compiled with DWScript. Since DWScript itself is not a full compiler, but a package of compiler tools around a very powerful scripting language more than this is necessary. Initially the game was written with a proprietary IDE with a closed source compiler. However, recently an DWScript based open source compiler is available which allows to compile the source code with an equal quality. It is part of the HOPE Object Pascal Environment. While the entire suite is still in some sort of an alpha state (the IDE does not seem to be very stable), its command-line compiler (HCC.exe) looks promising. It also comes with a node.js command-line compiler, which might also work.

Now, in order to compile the source code you'll first need to download the command-line compiler. In addition to this you'll need the HOPE APIs.

Once everything is in place just call:

HCC.exe Source\Cards.hpr

which should generate the file 'Cards.js' in the Output\www directory. All other files in that directory are static.

Hybrid web-apps with Cordova

In order to transform this game into a hybrid web-app for your mobile device it's only necessary to run a few cordova calls.

First move to the 'Output' directory. Then add a platform with

cordova platform add android

If cordova isn't installed already, please call

npm i -g cordova

to use the Node.js package manager ("npm") to install cordova.

Once a platform has been added the app can already get built with

cordova build

To run it on your device simply type

cordova run --device

If you omit the '--device' it will run inside the emulator instead.

License

The source code is released under the MIT license.

cards's People

Contributors

cwbudde avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 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.