From 04b31c3f8ac56e8e20cfd1f288912bb8c0d77085 Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Mon, 1 Jan 2018 17:56:00 +0000 Subject: Remove Canfield from canonical solitaires --- resources/canfield.json | 8 -------- resources/simple-canfield.json | 9 --------- 2 files changed, 17 deletions(-) delete mode 100644 resources/canfield.json delete mode 100644 resources/simple-canfield.json (limited to 'resources') diff --git a/resources/canfield.json b/resources/canfield.json deleted file mode 100644 index 6ea3824..0000000 --- a/resources/canfield.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "tableau piles": { - "count": 4, - "build policy": "red-black" - }, - "reserve size": 14, - "stock size": 34 -} \ No newline at end of file diff --git a/resources/simple-canfield.json b/resources/simple-canfield.json deleted file mode 100644 index d93e9be..0000000 --- a/resources/simple-canfield.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "tableau piles": { - "count": 2, - "build policy": "red-black" - }, - "max rank": 2, - "reserve size": 2, - "stock size": 2 -} \ No newline at end of file -- cgit v1.2.1 From 9ad093dc713f5464181b1018e80ec359ca381bb3 Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Tue, 2 Jan 2018 11:27:27 +0000 Subject: Add json rules for bakers dozen --- resources/bakers-dozen.json | 6 ++++++ resources/default.json | 3 ++- resources/simple-bakers-dozen.json | 7 +++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 resources/bakers-dozen.json create mode 100644 resources/simple-bakers-dozen.json (limited to 'resources') diff --git a/resources/bakers-dozen.json b/resources/bakers-dozen.json new file mode 100644 index 0000000..7f49b61 --- /dev/null +++ b/resources/bakers-dozen.json @@ -0,0 +1,6 @@ +{ + "tableau piles": { + "count": 13, + "spaces policy": "no-build" + } +} \ No newline at end of file diff --git a/resources/default.json b/resources/default.json index 629c46a..12d39b2 100644 --- a/resources/default.json +++ b/resources/default.json @@ -2,7 +2,8 @@ "tableau piles": { "count": 8, "build order": "descending", - "build policy": "any-suit" + "build policy": "any-suit", + "spaces policy": "any" }, "max rank": 13, "hole": false, diff --git a/resources/simple-bakers-dozen.json b/resources/simple-bakers-dozen.json new file mode 100644 index 0000000..4bb0dc7 --- /dev/null +++ b/resources/simple-bakers-dozen.json @@ -0,0 +1,7 @@ +{ + "tableau piles": { + "count": 3, + "spaces policy": "no-build" + }, + "max rank": 3 +} \ No newline at end of file -- cgit v1.2.1 From 77a7aeba7854d15b140cc6dc3c69b15ed5f3b936 Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Wed, 3 Jan 2018 12:30:14 +0000 Subject: Major refactor, putting pile logic into game_state Much of the logic that was in the pile class was beginning to seem out of place. A lot of the rules have fairly arbitrary interactons *between* piles, which weren't best represented in the pile classes themselves, which were getting unweildy and inefficient. Hence, much of this logic has been moved to the game state class. --- resources/black-hole.json | 2 +- resources/simple-black-hole.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'resources') diff --git a/resources/black-hole.json b/resources/black-hole.json index 64ffe76..daab27c 100644 --- a/resources/black-hole.json +++ b/resources/black-hole.json @@ -1,7 +1,7 @@ { "tableau piles": { "count": 17, - "build order": "no-build" + "build policy": "no-build" }, "hole": true, "foundations": false diff --git a/resources/simple-black-hole.json b/resources/simple-black-hole.json index 9aee62f..16ef52d 100644 --- a/resources/simple-black-hole.json +++ b/resources/simple-black-hole.json @@ -1,7 +1,7 @@ { "tableau piles": { "count": 4, - "build order": "no-build" + "build policy": "no-build" }, "max rank": 5, "hole": true, -- cgit v1.2.1 From 6ce3b5a142b3e357eeabde37368915e8ef916f3d Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Thu, 4 Jan 2018 11:38:36 +0000 Subject: Add json rules for fortunes favor --- resources/default.json | 2 +- resources/fortunes-favor.json | 8 ++++++++ resources/simple-fortunes-favor.json | 9 +++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 resources/fortunes-favor.json create mode 100644 resources/simple-fortunes-favor.json (limited to 'resources') diff --git a/resources/default.json b/resources/default.json index 12d39b2..756e31f 100644 --- a/resources/default.json +++ b/resources/default.json @@ -8,7 +8,7 @@ "max rank": 13, "hole": false, "foundations": true, + "foundation initial card": false, "cells": 0, - "reserve size": 0, "stock size": 0 } \ No newline at end of file diff --git a/resources/fortunes-favor.json b/resources/fortunes-favor.json new file mode 100644 index 0000000..b791561 --- /dev/null +++ b/resources/fortunes-favor.json @@ -0,0 +1,8 @@ +{ + "tableau piles": { + "count": 12, + "build policy": "same-suit" + }, + "foundations initial card": true, + "stock size": 36 +} \ No newline at end of file diff --git a/resources/simple-fortunes-favor.json b/resources/simple-fortunes-favor.json new file mode 100644 index 0000000..6f3cf61 --- /dev/null +++ b/resources/simple-fortunes-favor.json @@ -0,0 +1,9 @@ +{ + "tableau piles": { + "count": 3, + "build policy": "same-suit" + }, + "max rank": 4, + "foundations initial card": true, + "stock size": 3 +} \ No newline at end of file -- cgit v1.2.1 From e28645b3a2b610c1c95ed8f7553e336354b7d17f Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Thu, 4 Jan 2018 11:48:41 +0000 Subject: Add fortunes favor to benchmark script --- resources/flower-garden.json | 5 +++++ resources/simple-flower-garden.json | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 resources/flower-garden.json create mode 100644 resources/simple-flower-garden.json (limited to 'resources') diff --git a/resources/flower-garden.json b/resources/flower-garden.json new file mode 100644 index 0000000..2ffec07 --- /dev/null +++ b/resources/flower-garden.json @@ -0,0 +1,5 @@ +{ + "tableau piles": { + "count": 13 + } +} \ No newline at end of file diff --git a/resources/simple-flower-garden.json b/resources/simple-flower-garden.json new file mode 100644 index 0000000..6ba2fbc --- /dev/null +++ b/resources/simple-flower-garden.json @@ -0,0 +1,6 @@ +{ + "tableau piles": { + "count": 6 + }, + "reserve size": 16 +} -- cgit v1.2.1 From 88ed4cae6e8174102ee21ce15b03aa40fa032c29 Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Thu, 4 Jan 2018 15:44:47 +0000 Subject: Add rules json for flower garden --- resources/default.json | 5 +++-- resources/flower-garden.json | 7 ++++--- resources/simple-flower-garden.json | 5 +++-- 3 files changed, 10 insertions(+), 7 deletions(-) (limited to 'resources') diff --git a/resources/default.json b/resources/default.json index 756e31f..f3e9446 100644 --- a/resources/default.json +++ b/resources/default.json @@ -8,7 +8,8 @@ "max rank": 13, "hole": false, "foundations": true, - "foundation initial card": false, + "foundations initial card": false, "cells": 0, - "stock size": 0 + "stock size": 0, + "reserve size": 0 } \ No newline at end of file diff --git a/resources/flower-garden.json b/resources/flower-garden.json index 2ffec07..6ba2fbc 100644 --- a/resources/flower-garden.json +++ b/resources/flower-garden.json @@ -1,5 +1,6 @@ { "tableau piles": { - "count": 13 - } -} \ No newline at end of file + "count": 6 + }, + "reserve size": 16 +} diff --git a/resources/simple-flower-garden.json b/resources/simple-flower-garden.json index 6ba2fbc..7e6f329 100644 --- a/resources/simple-flower-garden.json +++ b/resources/simple-flower-garden.json @@ -1,6 +1,7 @@ { "tableau piles": { - "count": 6 + "count": 3 }, - "reserve size": 16 + "max rank": 3, + "reserve size": 3 } -- cgit v1.2.1 From 6f56c50d2678f1640f8c15ff5cfcff03af3f52b2 Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Fri, 5 Jan 2018 15:53:30 +0000 Subject: Add json rules for canfield --- resources/canfield.json | 9 +++++++++ resources/default.json | 3 ++- resources/simple-canfield.json | 10 ++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 resources/canfield.json create mode 100644 resources/simple-canfield.json (limited to 'resources') diff --git a/resources/canfield.json b/resources/canfield.json new file mode 100644 index 0000000..5f36a72 --- /dev/null +++ b/resources/canfield.json @@ -0,0 +1,9 @@ +{ + "tableau piles": { + "count": 4, + "build policy": "red-black" + }, + "stock size": 34, + "reserve size": 14, + "reserve stacked": true +} diff --git a/resources/default.json b/resources/default.json index f3e9446..29f3aec 100644 --- a/resources/default.json +++ b/resources/default.json @@ -11,5 +11,6 @@ "foundations initial card": false, "cells": 0, "stock size": 0, - "reserve size": 0 + "reserve size": 0, + "reserve stacked": false } \ No newline at end of file diff --git a/resources/simple-canfield.json b/resources/simple-canfield.json new file mode 100644 index 0000000..62a73c3 --- /dev/null +++ b/resources/simple-canfield.json @@ -0,0 +1,10 @@ +{ + "tableau piles": { + "count": 3, + "build policy": "red-black" + }, + "max rank": 3, + "stock size": 1, + "reserve size": 2, + "reserve stacked": true +} \ No newline at end of file -- cgit v1.2.1 From 5886a4e8be7fb5e15617a8e58f207ec008ca93e2 Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Fri, 5 Jan 2018 18:00:41 +0000 Subject: Add json rules for somerset --- resources/simple-somerset.json | 7 +++++++ resources/somerset.json | 5 +++++ 2 files changed, 12 insertions(+) create mode 100644 resources/simple-somerset.json create mode 100644 resources/somerset.json (limited to 'resources') diff --git a/resources/simple-somerset.json b/resources/simple-somerset.json new file mode 100644 index 0000000..7b218ef --- /dev/null +++ b/resources/simple-somerset.json @@ -0,0 +1,7 @@ +{ + "tableau piles": { + "count": 10, + "build policy": "red-black", + "diagonal deal": true + } +} \ No newline at end of file diff --git a/resources/somerset.json b/resources/somerset.json new file mode 100644 index 0000000..2ffec07 --- /dev/null +++ b/resources/somerset.json @@ -0,0 +1,5 @@ +{ + "tableau piles": { + "count": 13 + } +} \ No newline at end of file -- cgit v1.2.1 From cc9a9721d3a7bdbbcc055986c014a0665d5b3e63 Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Fri, 5 Jan 2018 18:01:17 +0000 Subject: Add unit tests for somerset --- resources/default.json | 3 ++- resources/simple-somerset.json | 5 +++-- resources/somerset.json | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-) (limited to 'resources') diff --git a/resources/default.json b/resources/default.json index 29f3aec..6df3933 100644 --- a/resources/default.json +++ b/resources/default.json @@ -3,7 +3,8 @@ "count": 8, "build order": "descending", "build policy": "any-suit", - "spaces policy": "any" + "spaces policy": "any", + "diagonal deal": false }, "max rank": 13, "hole": false, diff --git a/resources/simple-somerset.json b/resources/simple-somerset.json index 7b218ef..309b217 100644 --- a/resources/simple-somerset.json +++ b/resources/simple-somerset.json @@ -1,7 +1,8 @@ { "tableau piles": { - "count": 10, + "count": 4, "build policy": "red-black", "diagonal deal": true - } + }, + "max rank": 2 } \ No newline at end of file diff --git a/resources/somerset.json b/resources/somerset.json index 2ffec07..7b218ef 100644 --- a/resources/somerset.json +++ b/resources/somerset.json @@ -1,5 +1,7 @@ { "tableau piles": { - "count": 13 + "count": 10, + "build policy": "red-black", + "diagonal deal": true } } \ No newline at end of file -- cgit v1.2.1 From 22b347e97a9da26a2cddd7b5a04e1a7a62069d23 Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Mon, 8 Jan 2018 18:46:11 +0000 Subject: Add json rules for alpha star --- resources/alpha-star.json | 8 ++++++++ resources/default.json | 3 ++- resources/simple-alpha-star.json | 9 +++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 resources/alpha-star.json create mode 100644 resources/simple-alpha-star.json (limited to 'resources') diff --git a/resources/alpha-star.json b/resources/alpha-star.json new file mode 100644 index 0000000..fde3ac4 --- /dev/null +++ b/resources/alpha-star.json @@ -0,0 +1,8 @@ +{ + "tableau piles": { + "count": 12, + "build policy": "same-suit", + "move built group": true + }, + "foundations initial card": true +} \ No newline at end of file diff --git a/resources/default.json b/resources/default.json index 6df3933..5d4df74 100644 --- a/resources/default.json +++ b/resources/default.json @@ -4,7 +4,8 @@ "build order": "descending", "build policy": "any-suit", "spaces policy": "any", - "diagonal deal": false + "diagonal deal": false, + "move built group": false }, "max rank": 13, "hole": false, diff --git a/resources/simple-alpha-star.json b/resources/simple-alpha-star.json new file mode 100644 index 0000000..9b15004 --- /dev/null +++ b/resources/simple-alpha-star.json @@ -0,0 +1,9 @@ +{ + "tableau piles": { + "count": 3, + "build policy": "same-suit", + "move built group": true + }, + "max rank": 5, + "foundations initial card": true +} \ No newline at end of file -- cgit v1.2.1 From ef291b15a21f2f6cfa98b2c4f2572de5a61a2fa9 Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Tue, 9 Jan 2018 08:51:11 +0000 Subject: Add json rules for spider --- resources/default.json | 2 ++ resources/simple-spider.json | 9 +++++++++ resources/spider.json | 8 ++++++++ 3 files changed, 19 insertions(+) create mode 100644 resources/simple-spider.json create mode 100644 resources/spider.json (limited to 'resources') diff --git a/resources/default.json b/resources/default.json index 5d4df74..3a9800d 100644 --- a/resources/default.json +++ b/resources/default.json @@ -8,11 +8,13 @@ "move built group": false }, "max rank": 13, + "two decks": false, "hole": false, "foundations": true, "foundations initial card": false, "cells": 0, "stock size": 0, + "stock deal type": "waste", "reserve size": 0, "reserve stacked": false } \ No newline at end of file diff --git a/resources/simple-spider.json b/resources/simple-spider.json new file mode 100644 index 0000000..b931efb --- /dev/null +++ b/resources/simple-spider.json @@ -0,0 +1,9 @@ +{ + "tableau piles": { + "count": 4 + }, + "two decks": true, + "max rank": 3, + "stock size": 12, + "stock deal type": "tableau piles" +} \ No newline at end of file diff --git a/resources/spider.json b/resources/spider.json new file mode 100644 index 0000000..4d93a47 --- /dev/null +++ b/resources/spider.json @@ -0,0 +1,8 @@ +{ + "tableau piles": { + "count": 10 + }, + "two decks": true, + "stock size": 60, + "stock deal type": "tableau piles" +} \ No newline at end of file -- cgit v1.2.1