Possibly improve color choices

This commit is contained in:
Pyrex 2024-02-08 13:12:34 -08:00
parent 3d6e171caa
commit 5dc6f763cd
5 changed files with 17 additions and 7 deletions

View File

@ -20,4 +20,12 @@ end
function main:draw() function main:draw()
cls(13) cls(13)
self.board:draw() self.board:draw()
pal(1,0,1)
pal(3,-5,1)
pal(4,-7,1)
pal(12,12,1)
pal(11,-5,1)
pal(13,-8,1)
pal(14,5,1)
pal(15,-9,1)
end end

View File

@ -10,7 +10,7 @@ progression={
-- level 5 -- level 5
-- ruleset:new(9,3,11,18), -- ruleset:new(9,3,11,18),
-- fortune's foundation -- fortune's foundation
ruleset:new(11,4,13,22) -- ruleset:new(11,4,13,22)
-- harder than fortune's foundation -- harder than fortune's foundation
-- ruleset:new(11,5,10,25) ruleset:new(11,5,10,25)
} }

View File

@ -98,7 +98,7 @@ function ruleset:generate_deck()
if (meta.suit=='s') s,fg=1,12 if (meta.suit=='s') s,fg=1,12
if (meta.suit=='c') s,fg=2,2 if (meta.suit=='c') s,fg=2,2
if (meta.suit=='w') s,fg=3,3 if (meta.suit=='w') s,fg=3,3
if (meta.suit=='b') s,fg=3,0 if (meta.suit=='b') s,fg=4,14
if (meta.suit=='a') fg=15 if (meta.suit=='a') fg=15
if meta.suit=='a' then if meta.suit=='a' then

View File

@ -12,20 +12,20 @@ mod zobrist;
fn main() { fn main() {
/*
let ruleset = Ruleset { let ruleset = Ruleset {
n_slots: 11, n_slots: 11,
n_suits: 5, n_suits: 5,
n_cards_per_suit: 10, n_cards_per_suit: 10,
n_arcana: 25 n_arcana: 25
}; };
*/ /*
let ruleset = Ruleset { let ruleset = Ruleset {
n_slots: 11, n_slots: 11,
n_suits: 4, n_suits: 4,
n_cards_per_suit: 13, n_cards_per_suit: 13,
n_arcana: 22 n_arcana: 22
}; };
*/
/* /*
let ruleset = Ruleset { let ruleset = Ruleset {
n_slots: 5, n_slots: 5,

View File

@ -1,6 +1,6 @@
use rand::{seq::SliceRandom, Rng}; use rand::{seq::SliceRandom, Rng};
use crate::ruleset::{Card, Setup}; use crate::ruleset::{self, Card, Setup};
pub struct Deal { pub struct Deal {
pub slots: Vec<Vec<Card>>, pub slots: Vec<Vec<Card>>,
@ -53,7 +53,9 @@ impl Deal {
shuffles = extra_shuf shuffles = extra_shuf
} }
} }
for _ in shuffles..2 { // TODO: Use this in the game too
let max_shuffles = 2; // if setup.ruleset.n_suits < 5 { 2 } else { 1 };
for _ in shuffles..max_shuffles {
slots.choose_mut(rng).unwrap().shuffle(rng); slots.choose_mut(rng).unwrap().shuffle(rng);
} }