Skip to content

Repository files navigation

Manipulation

A browser prototype of a two-deck rummy-family card game based on the rules Kyle's grandmother called Manipulation.

Run locally

Start a static file server from this folder:

python3 -m http.server 4173

Then open:

http://127.0.0.1:4173/

GitHub Pages

This repository includes a workflow at .github/workflows/deploy-pages.yml that publishes the site to the gh-pages branch on pushes to main. Enable GitHub Pages in the repository settings and choose the gh-pages branch as the deployment source.

License

This project is released under the MIT License. See the LICENSE file for details.

Generated by GPT

This project was generated almost entirely by GPT-5.5, with manual adjustments and review by the author.

Rules

Manipulation is played with two standard 52-card decks and no jokers. This prototype is always a human player against a computer opponent.

Setup

  • Shuffle both decks together.
  • Deal three cards to each player.
  • The human player takes the first turn.

Goal

Be the first player to get rid of every card in your hand.

Valid table groups

Every group on the table must have at least three cards and must be one of these:

  • A same-rank set of three or four cards, such as three 8s or four Queens.
  • A suited run of three or more cards in sequence, such as 4-5-6 of clubs. Runs can be any length from three cards up; unlike sets, they are not capped at four cards.

Runs can loop from King back to Ace, so Queen-King-Ace and King-Ace-2 are valid when all cards are the same suit.

Turns

On your turn, you must play at least one card before you can end the turn. A play can be a new group, adding to an existing group, or manipulating the table so every resulting group remains valid.

If you have any playable move, you cannot draw. If you have no playable move, draw cards one at a time until you can play.

After you play, the whole table must be valid before you can end your turn.

Manipulation

You may rearrange cards already on the table during your turn. You can split groups, combine groups, move cards between groups, or add cards from your hand, as long as every group left on the table is valid.

For example, if the table has 4-5-6-7-8 of hearts and 8-8-8, and you hold 6 of hearts, you can play your 6 and split the heart run into 4-5-6 and 6-7-8 while leaving the set of 8s alone. A more complicated turn might split multiple existing melds and recombine their cards, provided every final group is still a valid set or run with at least three cards.

Cards played or drawn during the current turn can be taken back before the turn ends. You can also restore the turn to its starting table and hand state.

Current Features

  • Two standard 52-card decks
  • Human vs. computer play
  • Computer opponent that draws only when forced, builds melds, adds to table groups, and performs simple legal table splits
  • Three-card opening deal
  • Draw-until-playable turn flow
  • Table manipulation with validation for same-rank sets and looping suited runs
  • Turn restore
  • Take-back support for cards played during the current turn
  • Subtle highlighting for cards that can be taken back

Notes

This is currently a local browser prototype. Adding online play would need a server, rooms, turn synchronization, and private per-player hands.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages