Thousand Card Game: logic in TypeScript

in #utopian-io7 years ago (edited)

The scope of the contribution:

The scope of the contribution are PRs sent to gornanization/1k project. This includes:

  • Battle logic implementation + unit tests (PR),
  • unit tests for validation function, which watches for sharing stock phase finalization (PR),
  • bidding validation fixes (PR),
  • unit tests for redux reducer (PR).

What is this project about?

The gornanization/1k project describes thousand card game logic, written in TypeScript. If you are not familiar with the game rules, please visit https://www.pagat.com/marriage/1000.html

What is the goal of the project?

We want to extend ordinary card game process with some new technologies. So we will be able to play remotely you might think. Of course NOT! We do not want to major advantages coming from real, face-to-face meetings with friends. See set of tools list, you have to possess in order to play both ordinary thousand card game process and 1k solution presented below to find out, how does it work in practice:

ordinary thousand card game process1k solution
table (you have to throw card somewhere)your living room TV (table is displayed on it!)
deck (basically, set of cards you are holding during the course of a game)your mobile phone (your cards are displayed on it!)
piece of paper and a pen (just for result calculation)- (you have displayed it on the TV)

In first step we want to implement just card game logic (validation, whether player is able to throw card etc.). In near future, we will provide mobile phone card set, and game table clients to allow player throwing cards, and reviewing game state on the TV!

Technologies:

  • TypeScript
  • Mocha (unit testing)
  • Redux (state management)

Lead Paradigm:

Lead paradigm standing behind the game logic is functional programming, and all of its advantages (pure functions, no side effects, immutable data types, functions as first class citizen, no global state etc.).

More PRs coming soon... Cheers!

Sort:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Hey @adasq I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Coin Marketplace

STEEM 0.16
TRX 0.14
JST 0.028
BTC 59274.98
ETH 2600.78
USDT 1.00
SBD 2.44