and there you half it folks

This commit is contained in:
vat
2024-05-26 13:23:20 -04:00
parent bb4400366b
commit 2a5b921e7d
9 changed files with 103894 additions and 7 deletions

View File

@@ -0,0 +1,2 @@
yeah, maybe if the jam was 100 days... after u turn 30 every week = 1 day
ive barely begun to think about this

14
inc/copgcops.scm Normal file
View File

@@ -0,0 +1,14 @@
;; 'oop goops' but 'cop gcops'
;; instead of Object oriented programming, it is zzCell oriented
(define-module (cop gcops)
; :use-module (blah blah)
:use-module (waffle ufo)
:use-module (zipstyke notcurses)
:use-module (s7 s7)
)
(export prims zzcell slice dimension rank canvas
zzdb zzvm waffle zipstyke
)
(export-syntax
)

1246
inc/s7.h Normal file

File diff suppressed because it is too large Load Diff

13
pseud
View File

@@ -1,5 +1,4 @@
Explain, O supereminent in virtue, the game on the eight
times eight board:
Explain, O supereminent in virtue, the game on the eight times eight board:
Tell me, O my master, how the Chatarunga may be played.
Vyasa replied:
set up board
@@ -8,14 +7,14 @@ set up board
[abcd1234 x 4 quadrants] over [all 8]
rules (modular)
;; a {w} & {b} ... uncheckered
;; a {w} & {b} ... ashtapad uncheckered
players
1 vs cpu
2
4
ally
🜃 🜄 🜂 🜁
earth water fire air
north west south east
black blue red yellow {e}
@@ -32,15 +31,15 @@ for each {player}'s turn
raj {or} pada
elephant [proto-rook]
gaja, hasti / elephant [proto-rook]
move [1 or 2] < [or any] squares in any direction
else if ashva, horse [knight]
else if ashva / horse [knight]
;; else if rath / chariot [rook]
ship boat [bishop]
nauca, rukh / ship, boat [bishop]
move 2 diagonally (jump)
else if padati, foot soldier

108
rule/chat.ss Normal file
View File

@@ -0,0 +1,108 @@
; focus on the main sequence of actual rules going off
(define-rules chaturanji
(init-board:
((🜃 🜃 _ _ 🜁 🜁 🜁 🜁)
(🜃 🜃 _ _ 🜁 🜁 🜁 🜁)
(🜃 🜃 _ _ _ _ _ _)
(🜃 🜃 _ _ _ _ _ _)
(_ _ _ _ _ _ 🜂 🜂)
(_ _ _ _ _ _ 🜂 🜂)
(🜄 🜄 🜄 🜄 _ _ 🜂 🜂)
(🜄 🜄 🜄 🜄 _ _ 🜂 🜂)))
;; ← ↑ → ↓ ↖ ↗ ↘ ↙
;; ■ □
(turns
(pass)
(define (die-roll)
(let ((die (+ 1 (random 6)))
(die2 (+ 1 (random 6)))) #;(second-die)
(list die die2)))
; (clockwise-turnshift)
(moves
(🜃
(
; 地王's asana is D1 (earth quadrant)
((( /_))
((_ ))
(((? /_)
((? )
)
; or
( ; PEON
((( _))
((_ )))
(((? _ _ ? ? ? ?))
((? _ _ ? ? ? ?)))
;; capture logic ↗ ↘
) ; /padati
; ... or or
;; make this logic clearer: (king or pawn) or (rest of pieces)
( #;hasti
((( _ /_))
((_ _ ))
(movement: all-directions))) #;/hasti
( #;ashva
((( ? ? )
(? ? /_))
((_ ? ?)
(? ? ))
(movement:
all-directions (all-directions flip-horizontally)))) #;/ashva
( #;ship
(((? ? /_)
( )
(? _ ? )
( ? ? ))
;; todo... add jump as well, ship moves 2 spaces
;this ((? ? … ♗ )
;may (⁝ ⁝ ↗ ⁝)
;be (? _ … ?)
;unnecessary (_ ? … ?))
(movement: all-directions))) #;/ship
); bhumi(player(1))
(🜁 (transform 🜃
( ) ( ) ( ) ( ) ( )
(transformations:
flip-clockwise))) ; vayu raj
(🜂 (transform 🜁
( ) ( ) ( ) ( ) ( )
(transformations:
flip-clockwise))) ; tejas raj
(🜄 (transform 🜂
( ) ( ) ( ) ( ) ( )
(transformations:
flip-clockwise))) ; apas raj
) ; moves
(order-of-play: 🜃 🜁 🜂 🜄)
) ; turns
(shatpada
(let ((player ; end of rank
))) ; and has captured, (check bank)
);/promo
(sinhasana
(let ((enemy-raj asana (if (equal?
))))); lands on the raj asana
;capture
;; remove enemy piece and add to 'bank'
;freeze
(let ((ally-raj asana (if (equal?
))))); lands on the ally's raj asana
;capture
;control pieces {or freeze}
)
(vrihannauka
(let ((enemy-ship enemy-ship ally-ship asana (if (equal?
))))) ; 'ship triumph' when a square occurs
(chaturanga #; occurs
(let ((enemy-raj asana #; blah
)))
); chaturanji occurs
);define-rules chaturanji

12
src/game.scm Normal file
View File

@@ -0,0 +1,12 @@
;; i have no idea how to program code, i assume its when you put things inside parentheses?
(define (init-board)
(let* ((nc (notcurses-get))
(stdplane (notcurses-stdplane nc)))
(for-each
(lambda (row)
(for-each
(lambda (piece)
(ncplane-putc stdplane piece 0 0))
row))
init-board)
(notcurses-refresh nc)))

4111
src/notcurses_s7.c Normal file

File diff suppressed because it is too large Load Diff

0
src/rules.scm Normal file
View File

98395
src/s7.c Normal file

File diff suppressed because it is too large Load Diff