Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View hsjoihs's full-sized avatar

hsjoihs hsjoihs

View GitHub Profile
@hsjoihs
hsjoihs / buggy.saty
Last active February 11, 2018 00:20
SATySFiの行送りのバグっぽいもの。ソースコードは https://github.com/gfngfn/SATySFi/tree/master/demo を改変。
@require: stdjabook
@require: code
@require: itemize
@require: tabular
@require: math
@import: local
document (|
title = {Buggy?};
author = {hsjoihs};
calc :: [a] -> Int -> (a -> a -> a) -> [a]
calc xs n o = ys ++ [o a b] ++ zs where (ys,a:b:zs) = splitAt n xs
connect :: [String] -> Int -> String -> [String]
connect xs n o = calc xs n (f o)
where f o a b = "(" ++ a ++ " " ++ o ++ " " ++ b ++ ")"
toAll :: (c -> a -> b -> c) -> c -> [a] -> [b] -> c
toAll _ xs [] [] = xs
toAll f xs (n:ns) (o:os) = toAll f (f xs n o) ns os
後述するように、手が揃いやすいので字牌を削ってツモ数を削る
https://twitter.com/hsjoihs/status/910420220816236544
(後述する槓子以外の)面子の条件は「3つの牌で作れる数が素数であること」、雀頭の条件は「2つの牌で作れる数が素数であること」
https://twitter.com/hsjoihs/status/910408195750764544
4つの面子が四つ子素数をなすとき役満
https://twitter.com/asangi_a4ac/status/910415367465345024
https://twitter.com/nullset_mn/status/910418411766681600
(Moved to https://github.com/sozysozbot/akrantiain2/blob/master/samples/sample_lineparine.txt)
(Moved to https://github.com/sozysozbot/akrantiain2/blob/master/samples/sample_swedish.txt)
@hsjoihs
hsjoihs / Makefile
Created February 14, 2017 00:28
tmp
install : ccsc ccsrc
ccsc : ghc
ghc --make ccsc -o ccsc && chmod 755 ccsc
ccsrc : ghc
ghc --make ccsrc -o ccsrc && chmod 755 ccsrc
ghc :
sudo apt-get install haskell-platform
@hsjoihs
hsjoihs / README-Template.md
Created February 13, 2017 23:48 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites