GithubHelp home page GithubHelp logo

scalaokey's Introduction

Rules

101

Each player gets 21 pieces Turn player gets an extra piece

  • When player opens and has no board piece game, can end even if the score isn't enough, but hadn't processed
  • When player draws left, drawn piece must be used on opens

Side

East West North South

Sides

Board

pieces: List[Piece]

Open

owner: Side pieces: List[Piece]

OpenSerie OpenPair

Table

boards: Sides[Board] discard pieces: Sides[List[Piece]] middle pieces: List[Piece] opens: Option[(Sequence, Pair)] sign piece: Piece

101

Draw Left Draw Middle Discard Left Discard End Open Sequence Open Pairs

Process piece to x [l|r|replace] Collect Open Leave Draw

Standard

Draw Left Draw Middle Discard Left Discard End

Player

Situation

Middle End When middle has no pieces left Discard End When a player board has no pieces left after player discards piece Player Turn End When a player discards piece

Available moves

  • Draw middle piece
    • Discard a piece
    • Open series
      • Open series
      • Collect open
      • Drop piece
    • Open pairs
      • Open pairs
      • Collect open
      • Drop piece
  • Draw left piece
    • Open series
    • Open pairs
    • Leave taken

Move

Draw Middle (piece) Discard (piece) Draw Left Leave taken open series (piece groups) collect open drop open (piece) (group, at)

FEN

specific for side

middle = middleCount + gosterge

board/discards/series/pairs/middle

Scores

If you have single piece left and discard, game ends

End by Hand

When nobody opened, you open and end, you end by hand, Opponents get double score

End by Pair

If you opened pairs, and end, you end by pair Opponents get double score

End by Discard Okey

If you end by discarding okey, you end by discard okey Opponents get double score

Game End

If no middle piece left or a player has no piece left after discard game ends

After game ends if player has opened gets score of the sum of their hand pieces if player hasn't opened gets full score regardless of the hand sum if player has a okey in hand gets full score

if player has opened pairs gets double score

if player ends the game gets negative full score if player ends by discard okey gets negative double score

example:

end by hand x2 end by pair x2 end by discard okey x2

o h mhp md = t p1 os 10 +101 x2 x2 = 40 + 101 p2 op 20 x2 x2 x2 = 40 p3 no xx +101 x2 x2 = 404 p4 os 0 -101 x2 = -202

open type hand sum okey left end type

Okey Piece Open

open series

score

validate

examples

sign: b3 okey: b4 fake: b4

r1r2r3r4 10 r1r2b4r4 10 r4l4f0g4 16

open series r1r2r3r4 r1r2b4r4 r4l4f0g4

R1 R2 R3 R4 R1 R2 B4(R3) R4 (score) R4 L4 F0(B4) G4 (score)

(valid R1 R2 R3 R4 10) (valid R1 R2 B4 R4 10) (valid L4 F0 G4 12)

table open series

drop open

R5 group 1 right

get group

(valid R1 R2 R3 R4 10) (valid R1 R2 R3 R4 R5 15) drop R5

replace (valid R1 R2 B4 R4 10) (valid R1 R2 R3 R4 10) drop R3 [replace okey]

Drop Opens

Opened player can drop opens on other open groups Not opened player can't drop opens

Drop Open Pair

If someone opened pairs, other players can drop open their pairs

scalaokey's People

Contributors

eguneys 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.