Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/daviemakz/simulate-match
Simulates a card game called "Match!" between two computer players using N packs of cards (standard 52 card, 4 suit packs).
https://github.com/daviemakz/simulate-match
match
Last synced: 1 day ago
JSON representation
Simulates a card game called "Match!" between two computer players using N packs of cards (standard 52 card, 4 suit packs).
- Host: GitHub
- URL: https://github.com/daviemakz/simulate-match
- Owner: daviemakz
- License: gpl-3.0
- Created: 2017-02-14T17:42:36.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-16T09:32:00.000Z (almost 8 years ago)
- Last Synced: 2024-11-16T07:57:10.154Z (about 2 months ago)
- Topics: match
- Language: Perl
- Homepage:
- Size: 36.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# STATUS
[![Build Status](https://travis-ci.org/daviemakz/simulate-match.svg?branch=master)](https://travis-ci.org/daviemakz/simulate-match)
[![Issue Count](https://codeclimate.com/github/daviemakz/simulate-match/badges/issue_count.svg)](https://codeclimate.com/github/daviemakz/simulate-match)# SUMMARY
This is a small repository which simulates a card game called "Match!" between two computer players using N packs of cards (standard 52 card, 4 suit packs).The "Match!" matching condition can be the face value of the card, the suit, or both. When two matching cards are played sequentially, a player is chosen randomly as having declared "Match!" first and takes ownership of all cards played in that run.
Play continues until the pile is completely exhausted (any cards played without ending in a "Match!" at the time the pile is exhausted are ignored). The total number of cards "owned" by each player is counted up and a winner/draw is declared.
# HOW TO INSTALL
To install the application run the following commands:
perl Makefile.PL
make
make test
make install# HOW TO RUN
To execute the program run the following command in your terminal:
play-match
# TESTS
To run manual tests navigate to the repository root directory and execute:
prove
or
make test
Enjoy!