Skip to content

Instantly share code, notes, and snippets.

View ryohji's full-sized avatar

Ryohji Ikebe ryohji

  • Tokyo, Japan
View GitHub Profile
@ryohji
ryohji / test-scenario_ASHES-and-RUINS.md
Created March 30, 2026 14:15
テストシナリオ(ASHES & RUINS)
title 朽ちた見張り塔
system 灰塵の遺跡(ASHES & RUINS)
scenes 6
version 0.1
date 2026-03-29
purpose システム動作確認用・軽量シナリオ

シナリオ「朽ちた見張り塔」

セッションログ「朽ちた見張り塔」

システム:灰塵の遺跡(ASHES & RUINS) シナリオ:scenario_test.md 開始日:2026-03-30


PC 一覧

@ryohji
ryohji / ASHES-and-RUINS.md
Created March 30, 2026 14:10
灰塵の遺跡(ASHES & RUINS)
title 灰塵の遺跡(ASHES & RUINS)ゲームシステム仕様書
version 0.2
date 2026-03-29

灰塵の遺跡(ASHES & RUINS)ゲームシステム仕様書


1月 2月 3月 4月 5月 6月 7月 8月 9月 10月 11月 12月
1 32 60 91 121 152 182 213 244 274 305 335
2 33 61 92 122 153 183 214 245 275 306 336
3 34 62 93 123 154 184 215 246 276 307 337
4 35 63 94 124 155 185 216 247 277 308 338
5 36 64 95 125 156 186 217 248 278 309 339
6 37 65 96 126 157 187 218 249 279 310 340
7 38 66 97 127 158 188 219 250 280 311 341
8 39 67 98 128 159 189 220 251 281 312 342
@ryohji
ryohji / update_all_elements_in_vector.cc
Created January 21, 2022 16:33
Use transform(map) function to modify the elements in a container. [C++]
#include <algorithm>
#include <iostream>
#include <iterator>
#include <vector>
int main() {
auto v = std::vector<int> {1, 2, 3};
// Use transform to update all elements in the vector.
std::transform(std::cbegin(v), std::cend(v), std::begin(v),
@ryohji
ryohji / cleanup_list.py
Last active August 9, 2021 06:50
リストから不要な要素を取りのぞく方法
import unittest
def cleanup_list(list):
i = 0
while i < len(list): # pop のたびに list 長が変わる
elem = list[i]
if not elem.alive:
list.pop(i)
else:
@ryohji
ryohji / roff.c
Last active February 10, 2021 17:14
umoria roff
static vtype roffbuf; // Line buffer.
static char *roffp = roffbuf; // Pointer into line buffer.
static int roffpline = 0; // Place to print line now being loaded.
static uint8_t count_previous_non_blank_chars(const char *from);
// Print out strings, filling up lines as we go.
static void roff(const char *p) {
uint8_t count;
loop:
@ryohji
ryohji / not.md
Last active November 7, 2020 06:54
not operator in C

C 言語の not 演算子には2種類ある。 ~!。論理学では ~ を否定で使うことが多いけれど C 言語での論理否定は !~ はビットごとの否定。

ビットごとの否定

// bitwise-not.c
#include <stdbool.h>

int main() { return ~false; }
@ryohji
ryohji / gist:8a54bb046555d703a316d418203ce401
Created May 2, 2020 18:25
(A ⇒ B) ∧ (¬A ⇒ C) = (A ∧ B) ∨ (¬A ∧ C)
(A ⇒ B) ∧ (¬A ⇒ C)
=
(¬A ∨ B) ∧ (¬¬A ∨ C)
=
(¬A ∨ B) ∧ (A ∨ C)
=
((¬A ∨ B) ∧ A) ∨ ((¬A ∨ B) ∧ C)
=
((¬A ∧ A) ∨ (B ∧ A)) ∨ ((¬A ∧ C) ∨ (B ∧ C))
=
@ryohji
ryohji / apparent-gibberish.md
Last active April 25, 2020 17:43
Make sense of the apparent gibberish in “A Logical Approach to Discrete Math” Ch.0

Every value in array segment b[1..n] that is not in b[i..j] is in b[i..j].

Let predicate p(v) be "v is in b[i..j]."

  (A k: 0<k<=N: ~p(b[k]) -> p(b[k]))
=
  (A k: 0<k<=N: ~~p(b[k]) | p(b[k]))
=
 (A k: 0