diff --git a/README.md b/README.md index 881c441..4d0f327 100644 --- a/README.md +++ b/README.md @@ -189,5 +189,41 @@ The scoring system is: - recycle waste: -70 points - undo a move: -30 points -## Freecell -## Spider +## Fourtimes + +Fourtimes is played with a standard 52-card deck. There are four open cells and four open foundations. Cards are dealt face up into eight cascades. Four of which has seven cards each, and other four has six cards each. +The top card of each cascade begins a tableu. Tableus must be built down by alternating colors. Foundations are built up by suit from ace to king. + +- Any cell card or top card of any cascade may be moved to build on a tableu, or moved to an empty cell, or to an empty cascade, or its foundation. +- Complete or partial tableus may be moved to build on existing tableus, or moved to empty cascades. + +- The aim of the game is to move all cards to their foundation piles. + +The scoring system is: + +- Add a card to foundation: 10 points +- Undo a move : -40 points + +## Octopus + +Octopus is played with 2 52-card playing decks. Initially 54 cards are dealt to the tableu in ten piles, face down except for the top cards. The tableu piles are build down by rank. In-suit sequences can be moved together. The 50 remaining cards can be dealth to the tableu 10 at a time when none of the piles are empty. + +The aim of the game Octopus is to remove all cards from the table. Assembling a tableu will remove it. The tableu piles build down by rank, and in suit sequences can be moved together. + +Game can be played with + + - 4 suits + - 2 suits + - 1 suit + +- Any card can be placed on an empty pile. + +The scoring system is: + + - A face down card that gets turned over: 10 points + - All face down cards are turned over on a pile: 15 points + - A card sitting atop next higher card of the same suit: 2 points + - A completed suit removed from the tableu: 50 points + - Undo a move: - 20 points + + diff --git a/content/out_0.json b/content/out_0.json index 7836d54..d01e9f9 100755 --- a/content/out_0.json +++ b/content/out_0.json @@ -1 +1 @@ -{"sprites":[{"name":"button_bg","tags":[{"from":0,"to":0,"name":"idle"},{"from":1,"to":1,"name":"hover"},{"from":2,"to":2,"name":"click"},{"from":3,"to":3,"name":"disabled"}],"packs":[{"frame":{"x":4,"y":4,"w":366,"h":200},"packed":{"x":660,"y":2496,"w":374,"h":208},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":366,"h":200},"packed":{"x":1034,"y":2496,"w":374,"h":208},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":366,"h":200},"packed":{"x":1408,"y":2496,"w":374,"h":208},"meta":{"duration":300}},{"frame":{"x":4,"y":4,"w":366,"h":200},"packed":{"x":1782,"y":2496,"w":374,"h":208},"meta":{"duration":100}}]},{"name":"card","tags":[{"from":0,"to":0,"name":"idle"},{"from":1,"to":1,"name":"hover"},{"from":2,"to":4,"name":"click"},{"from":5,"to":7,"name":"flip"},{"from":8,"to":8,"name":"back_idle"},{"from":9,"to":9,"name":"back_hover"},{"from":10,"to":10,"name":"back_click"},{"from":11,"to":13,"name":"back_flip"},{"from":14,"to":15,"name":"drag"},{"from":16,"to":17,"name":"back_drag"},{"from":18,"to":18,"name":"wait"},{"from":19,"to":19,"name":"shadow"}],"packs":[{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":1400,"y":1835,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":1612,"y":1835,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":1824,"y":1835,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":2036,"y":1835,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":2248,"y":1835,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":2460,"y":1835,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":1578,"y":747,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":1790,"y":747,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":2002,"y":747,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":2214,"y":747,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":2426,"y":747,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":0,"y":2243,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":212,"y":2243,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":424,"y":2243,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":636,"y":2243,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":848,"y":2243,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":1060,"y":2243,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":1272,"y":2243,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":1484,"y":2243,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":1696,"y":2243,"w":212,"h":253},"meta":{"duration":100}}]},{"name":"dropdown_bg","tags":[{"from":0,"to":0,"name":"idle"},{"from":1,"to":1,"name":"hover"}],"packs":[{"frame":{"x":4,"y":4,"w":510,"h":172},"packed":{"x":2156,"y":2496,"w":518,"h":180},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":510,"h":172},"packed":{"x":0,"y":2727,"w":518,"h":180},"meta":{"duration":100}}]},{"name":"main_bg","tags":[{"from":0,"to":0,"name":"idle"}],"packs":[{"frame":{"x":4,"y":4,"w":1570,"h":1080},"packed":{"x":0,"y":0,"w":1578,"h":1088},"meta":{"duration":100}}]},{"name":"main_card_bg","tags":[{"from":0,"to":0,"name":"solitaire"},{"from":1,"to":1,"name":"solitaire_hover"},{"from":2,"to":2,"name":"fourtimes"},{"from":3,"to":3,"name":"fourtimes_hover"},{"from":4,"to":4,"name":"octopus"},{"from":5,"to":5,"name":"octopus_hover"}],"packs":[{"frame":{"x":4,"y":4,"w":481,"h":739},"packed":{"x":1578,"y":0,"w":489,"h":747},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":481,"h":739},"packed":{"x":2067,"y":0,"w":489,"h":747},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":481,"h":739},"packed":{"x":0,"y":1088,"w":489,"h":747},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":481,"h":739},"packed":{"x":489,"y":1088,"w":489,"h":747},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":481,"h":739},"packed":{"x":978,"y":1088,"w":489,"h":747},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":481,"h":739},"packed":{"x":1467,"y":1088,"w":489,"h":747},"meta":{"duration":100}}]},{"name":"main_settings_bg","tags":[{"from":0,"to":0,"name":"idle"},{"from":1,"to":1,"name":"hover"}],"packs":[{"frame":{"x":4,"y":4,"w":652,"h":223},"packed":{"x":1908,"y":2243,"w":660,"h":231},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":652,"h":223},"packed":{"x":0,"y":2496,"w":660,"h":231},"meta":{"duration":100}}]},{"name":"main_title_bg","tags":[{"from":0,"to":0,"name":"idle"}],"packs":[{"frame":{"x":4,"y":4,"w":780,"h":560},"packed":{"x":1956,"y":1088,"w":788,"h":568},"meta":{"duration":100}}]},{"name":"menu_bar","tags":[{"from":0,"to":0,"name":"idle"}],"packs":[{"frame":{"x":4,"y":4,"w":240,"h":160},"packed":{"x":518,"y":2727,"w":248,"h":168},"meta":{"duration":100}}]},{"name":"navigation_bg","tags":[{"from":0,"to":0,"name":"idle"},{"from":1,"to":1,"name":"hover"}],"packs":[{"frame":{"x":4,"y":4,"w":593,"h":157},"packed":{"x":766,"y":2727,"w":601,"h":165},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":593,"h":157},"packed":{"x":1367,"y":2727,"w":601,"h":165},"meta":{"duration":100}}]},{"name":"panel_bg_nine_slice","tags":[{"from":0,"to":0,"name":"idle"}],"packs":[{"frame":{"x":4,"y":4,"w":400,"h":400},"packed":{"x":0,"y":1835,"w":408,"h":408},"meta":{"duration":100}}]},{"name":"rank","tags":[],"packs":[{"frame":{"x":4,"y":4,"w":64,"h":64},"packed":{"x":448,"y":2907,"w":72,"h":72},"meta":{"duration":100}}]},{"name":"recycle","tags":[{"from":0,"to":0,"name":"idle"},{"from":1,"to":3,"name":"hover"}],"packs":[{"frame":{"x":4,"y":4,"w":240,"h":300},"packed":{"x":408,"y":1835,"w":248,"h":308},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":240,"h":300},"packed":{"x":656,"y":1835,"w":248,"h":308},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":240,"h":300},"packed":{"x":904,"y":1835,"w":248,"h":308},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":240,"h":300},"packed":{"x":1152,"y":1835,"w":248,"h":308},"meta":{"duration":100}}]},{"name":"suit","tags":[{"from":0,"to":0,"name":"spades"},{"from":1,"to":1,"name":"hearts"},{"from":2,"to":2,"name":"diamonds"},{"from":3,"to":3,"name":"clubs"}],"packs":[{"frame":{"x":4,"y":4,"w":64,"h":64},"packed":{"x":520,"y":2907,"w":72,"h":72},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":64,"h":64},"packed":{"x":592,"y":2907,"w":72,"h":72},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":64,"h":64},"packed":{"x":664,"y":2907,"w":72,"h":72},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":64,"h":64},"packed":{"x":736,"y":2907,"w":72,"h":72},"meta":{"duration":100}}]},{"name":"tab3_bg","tags":[{"from":0,"to":0,"name":"idle"},{"from":1,"to":1,"name":"hover"},{"from":2,"to":2,"name":"active"}],"packs":[{"frame":{"x":4,"y":4,"w":440,"h":150},"packed":{"x":1968,"y":2727,"w":448,"h":158},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":440,"h":150},"packed":{"x":1956,"y":1656,"w":448,"h":158},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":440,"h":150},"packed":{"x":0,"y":2907,"w":448,"h":158},"meta":{"duration":100}}]}]} \ No newline at end of file +{"sprites":[{"name":"button_bg","tags":[{"from":0,"to":0,"name":"idle"},{"from":1,"to":1,"name":"hover"},{"from":2,"to":2,"name":"click"},{"from":3,"to":3,"name":"disabled"}],"packs":[{"frame":{"x":4,"y":4,"w":366,"h":200},"packed":{"x":1320,"y":2909,"w":374,"h":208},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":366,"h":200},"packed":{"x":1694,"y":2909,"w":374,"h":208},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":366,"h":200},"packed":{"x":2068,"y":2909,"w":374,"h":208},"meta":{"duration":300}},{"frame":{"x":4,"y":4,"w":366,"h":200},"packed":{"x":2442,"y":2909,"w":374,"h":208},"meta":{"duration":100}}]},{"name":"card","tags":[{"from":0,"to":0,"name":"idle"},{"from":1,"to":1,"name":"hover"},{"from":2,"to":4,"name":"click"},{"from":5,"to":7,"name":"flip"},{"from":8,"to":8,"name":"back_idle"},{"from":9,"to":9,"name":"back_hover"},{"from":10,"to":10,"name":"back_click"},{"from":11,"to":13,"name":"back_flip"},{"from":14,"to":15,"name":"drag"},{"from":16,"to":17,"name":"back_drag"},{"from":18,"to":18,"name":"wait"},{"from":19,"to":19,"name":"shadow"}],"packs":[{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":1578,"y":821,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":1790,"y":821,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":2002,"y":821,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":2214,"y":821,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":2426,"y":821,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":2638,"y":821,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":2850,"y":821,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":0,"y":2656,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":212,"y":2656,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":424,"y":2656,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":636,"y":2656,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":848,"y":2656,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":1060,"y":2656,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":1272,"y":2656,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":1484,"y":2656,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":1696,"y":2656,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":1908,"y":2656,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":2120,"y":2656,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":2332,"y":2656,"w":212,"h":253},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":204,"h":245},"packed":{"x":2544,"y":2656,"w":212,"h":253},"meta":{"duration":100}}]},{"name":"dropdown_bg","tags":[{"from":0,"to":0,"name":"idle"},{"from":1,"to":1,"name":"hover"}],"packs":[{"frame":{"x":4,"y":4,"w":510,"h":172},"packed":{"x":0,"y":3140,"w":518,"h":180},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":510,"h":172},"packed":{"x":518,"y":3140,"w":518,"h":180},"meta":{"duration":100}}]},{"name":"hmg_bg","tags":[{"from":0,"to":0,"name":"idle"},{"from":1,"to":1,"name":"hover"},{"from":2,"to":2,"name":"open"},{"from":3,"to":3,"name":"open_hover"}],"packs":[{"frame":{"x":4,"y":4,"w":240,"h":140},"packed":{"x":448,"y":3320,"w":248,"h":148},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":240,"h":140},"packed":{"x":696,"y":3320,"w":248,"h":148},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":240,"h":140},"packed":{"x":944,"y":3320,"w":248,"h":148},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":240,"h":140},"packed":{"x":1192,"y":3320,"w":248,"h":148},"meta":{"duration":100}}]},{"name":"main_bg","tags":[{"from":0,"to":0,"name":"idle"}],"packs":[{"frame":{"x":4,"y":4,"w":1570,"h":1080},"packed":{"x":0,"y":0,"w":1578,"h":1088},"meta":{"duration":100}}]},{"name":"main_card_bg","tags":[{"from":0,"to":0,"name":"solitaire"},{"from":1,"to":1,"name":"solitaire_hover"},{"from":2,"to":2,"name":"fourtimes"},{"from":3,"to":3,"name":"fourtimes_hover"},{"from":4,"to":4,"name":"octopus"},{"from":5,"to":5,"name":"octopus_hover"}],"packs":[{"frame":{"x":4,"y":4,"w":481,"h":739},"packed":{"x":1271,"y":1088,"w":489,"h":747},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":481,"h":739},"packed":{"x":1760,"y":1088,"w":489,"h":747},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":481,"h":739},"packed":{"x":2249,"y":1088,"w":489,"h":747},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":481,"h":739},"packed":{"x":0,"y":1909,"w":489,"h":747},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":481,"h":739},"packed":{"x":489,"y":1909,"w":489,"h":747},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":481,"h":739},"packed":{"x":978,"y":1909,"w":489,"h":747},"meta":{"duration":100}}]},{"name":"main_settings_bg","tags":[{"from":0,"to":0,"name":"idle"},{"from":1,"to":1,"name":"hover"}],"packs":[{"frame":{"x":4,"y":4,"w":652,"h":223},"packed":{"x":0,"y":2909,"w":660,"h":231},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":652,"h":223},"packed":{"x":660,"y":2909,"w":660,"h":231},"meta":{"duration":100}}]},{"name":"main_title_bg","tags":[{"from":0,"to":0,"name":"idle"}],"packs":[{"frame":{"x":4,"y":4,"w":780,"h":560},"packed":{"x":1822,"y":1909,"w":788,"h":568},"meta":{"duration":100}}]},{"name":"menu_bar","tags":[{"from":0,"to":0,"name":"idle"}],"packs":[{"frame":{"x":4,"y":4,"w":240,"h":160},"packed":{"x":1036,"y":3140,"w":248,"h":168},"meta":{"duration":100}}]},{"name":"navigation_bg","tags":[{"from":0,"to":0,"name":"idle"},{"from":1,"to":1,"name":"hover"}],"packs":[{"frame":{"x":4,"y":4,"w":593,"h":157},"packed":{"x":1284,"y":3140,"w":601,"h":165},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":593,"h":157},"packed":{"x":1885,"y":3140,"w":601,"h":165},"meta":{"duration":100}}]},{"name":"panel_bg_nine_slice","tags":[{"from":0,"to":0,"name":"idle"}],"packs":[{"frame":{"x":4,"y":4,"w":400,"h":400},"packed":{"x":2610,"y":1909,"w":408,"h":408},"meta":{"duration":100}}]},{"name":"rank","tags":[],"packs":[{"frame":{"x":4,"y":4,"w":64,"h":64},"packed":{"x":1440,"y":3320,"w":72,"h":72},"meta":{"duration":100}}]},{"name":"recycle","tags":[{"from":0,"to":0,"name":"idle"},{"from":1,"to":3,"name":"hover"}],"packs":[{"frame":{"x":4,"y":4,"w":240,"h":300},"packed":{"x":2738,"y":1088,"w":248,"h":308},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":240,"h":300},"packed":{"x":2738,"y":1396,"w":248,"h":308},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":240,"h":300},"packed":{"x":2849,"y":0,"w":248,"h":308},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":240,"h":300},"packed":{"x":2849,"y":308,"w":248,"h":308},"meta":{"duration":100}}]},{"name":"side_menu_bg","tags":[{"from":0,"to":0,"name":"idle"}],"packs":[{"frame":{"x":4,"y":4,"w":347,"h":659},"packed":{"x":1467,"y":1909,"w":355,"h":667},"meta":{"duration":100}}]},{"name":"suit","tags":[{"from":0,"to":0,"name":"spades"},{"from":1,"to":1,"name":"hearts"},{"from":2,"to":2,"name":"diamonds"},{"from":3,"to":3,"name":"clubs"}],"packs":[{"frame":{"x":4,"y":4,"w":64,"h":64},"packed":{"x":1512,"y":3320,"w":72,"h":72},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":64,"h":64},"packed":{"x":1584,"y":3320,"w":72,"h":72},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":64,"h":64},"packed":{"x":1656,"y":3320,"w":72,"h":72},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":64,"h":64},"packed":{"x":1728,"y":3320,"w":72,"h":72},"meta":{"duration":100}}]},{"name":"swiggle","tags":[{"from":0,"to":0,"name":"idle"},{"from":1,"to":1,"name":"small"}],"packs":[{"frame":{"x":4,"y":4,"w":1263,"h":813},"packed":{"x":1578,"y":0,"w":1271,"h":821},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":1263,"h":813},"packed":{"x":0,"y":1088,"w":1271,"h":821},"meta":{"duration":100}}]},{"name":"tab3_bg","tags":[{"from":0,"to":0,"name":"idle"},{"from":1,"to":1,"name":"hover"},{"from":2,"to":2,"name":"active"}],"packs":[{"frame":{"x":4,"y":4,"w":440,"h":150},"packed":{"x":2486,"y":3140,"w":448,"h":158},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":440,"h":150},"packed":{"x":2610,"y":2317,"w":448,"h":158},"meta":{"duration":100}},{"frame":{"x":4,"y":4,"w":440,"h":150},"packed":{"x":0,"y":3320,"w":448,"h":158},"meta":{"duration":100}}]}]} \ No newline at end of file diff --git a/content/out_0.png b/content/out_0.png index 98e2e2e..b238878 100755 Binary files a/content/out_0.png and b/content/out_0.png differ diff --git a/content/sprites/hmg_bg.ase b/content/sprites/hmg_bg.ase new file mode 100755 index 0000000..1bb27b9 Binary files /dev/null and b/content/sprites/hmg_bg.ase differ diff --git a/content/sprites/side_menu_bg.ase b/content/sprites/side_menu_bg.ase new file mode 100755 index 0000000..2d8e859 Binary files /dev/null and b/content/sprites/side_menu_bg.ase differ diff --git a/content/sprites/swiggle.ase b/content/sprites/swiggle.ase new file mode 100755 index 0000000..bb5749f Binary files /dev/null and b/content/sprites/swiggle.ase differ diff --git a/screens/navigation2.ase b/screens/navigation2.ase index 936c19d..147f0e2 100755 Binary files a/screens/navigation2.ase and b/screens/navigation2.ase differ diff --git a/src/game.ts b/src/game.ts index 9a6b16b..b3925b7 100644 --- a/src/game.ts +++ b/src/game.ts @@ -162,7 +162,7 @@ export class Clickable extends Play { let point = Rect.make(e.x - 4, e.y - 4, 8, 8) let rect = self.rect if (rect.overlaps(point)) { - return self.data.on_click_begin?.() || false + return self.data.on_click_begin?.() ?? false } return false }, @@ -175,7 +175,7 @@ export class Clickable extends Play { } if (_dragging) { let m = d.m!.mul(Game.v_screen) - return self.data.on_drag?.(m) || false + return self.data.on_drag?.(m) ?? false } if (d.m && (!d0 || !d0.m)) { @@ -184,7 +184,7 @@ export class Clickable extends Play { let rect = self.rect if (rect.overlaps(point)) { _dragging = true - return self.data.on_drag_begin?.(e) || false + return self.data.on_drag_begin?.(e) ?? false } else { return false } @@ -233,7 +233,7 @@ export class Clickable extends Play { if (rect.overlaps(point)) { if (!_hovering) { _hovering = true - return self.data.on_hover?.() || false + return self.data.on_hover?.() ?? false } } else { if (_hovering) { @@ -264,7 +264,7 @@ export class Clickable extends Play { let point = Rect.make(e.x - 4, e.y - 4, 8, 8) let rect = self.rect if (rect.overlaps(point)) { - return self.data.on_click?.() || false + return self.data.on_click?.() ?? false } return false }, @@ -276,7 +276,7 @@ export class Clickable extends Play { let point = Rect.make(e.x - 4, e.y - 4, 8, 8) let rect = self.rect if (rect.overlaps(point)) { - return self.data.on_wheel?.(d) || false + return self.data.on_wheel?.(d) ?? false } return false } @@ -1302,6 +1302,9 @@ class TabPanel extends Play { _selected_index!: number set selected_index(i: number) { this._selected_index = i + + + this.data.panels.forEach((_, _i) => _.visible = i === _i) } get active_panel() { diff --git a/src/howtos.ts b/src/howtos.ts index 4650ce7..def0e99 100644 --- a/src/howtos.ts +++ b/src/howtos.ts @@ -1,4 +1,33 @@ -let octopus = `` +let octopus = ` +Octopus is played with 2 52-card playing decks. Initially 54 cards are dealt to the tableu in ten piles, face down except for the top cards. The tableu piles are build down by rank. In-suit sequences can be moved together. The 50 remaining cards can be dealt to the tableu 10 at a time when none of the piles are empty. + +The aim of the game Octopus is to remove all cards from the table. Assembling a tableu will remove it. The tableu piles build down by rank, and in suit sequences can be moved together. + +Game can be played with + + - 4 suits + - 2 suits + - 1 suit + +- Any card can be placed on an empty pile. + +The scoring system is: + + - A face down card that gets turned over: 10 points + - All face down cards are turned over on a pile: 15 points + - A card sitting atop next higher card of the same suit: 2 points + - A completed suit removed from the tableu: 50 points + - Undo a move: - 20 points + + +Scoring multipliers: + + +- 1 suit: 1 multiplier +- 2 suits: 2 multiplier +- 4 suits: 3 multiplier + +` let solitaire = ` Solitaire is played with a standard 52-card deck. @@ -40,9 +69,29 @@ The scoring system is: - foundation to tableu: -15 points - recycle waste: -70 points - undo a move: -30 points + + +Scoring multipliers: + +- No limit: 1 multiplier +- 3 limits: 2 multiplier +- 1 limit: 3 multiplier ` -let fourtimes = `` +let fourtimes = ` +Fourtimes is played with a standard 52-card deck. There are four open cells and four open foundations. Cards are dealt face up into eight cascades. Four of which has seven cards each, and other four has six cards each. +The top card of each cascade begins a tableu. Tableus must be built down by alternating colors. Foundations are built up by suit from Ace to King. + +- Any cell card or top card of any cascade may be moved to build on a tableu, or moved to an empty cell, or to an empty cascade, or its foundation. +- Complete or partial tableus may be moved to build on existing tableus, or moved to empty cascades. + +- The aim of the game is to move all cards to their foundation piles. + +The scoring system is: + +- Add a card to foundation: 10 points +- Undo a move : -40 points +` let about = ` diff --git a/src/showcase.ts b/src/showcase.ts index 4e5d050..5f0cd61 100644 --- a/src/showcase.ts +++ b/src/showcase.ts @@ -283,7 +283,9 @@ export class Card extends Play { self._lerp_drag_shadow = 0 self._dragging = true self._drag_decay = e.sub(self.position) + return true } + return false }, on_drag_end() { self._dragging = false @@ -291,7 +293,9 @@ export class Card extends Play { on_drag(e: Vec2) { if (self._on_drag) { self._on_drag(e) + return true } + return false }, on_drop() { if (self._on_drop) { diff --git a/src/solitaire.ts b/src/solitaire.ts index 66ccd92..1d5a70e 100644 --- a/src/solitaire.ts +++ b/src/solitaire.ts @@ -630,27 +630,92 @@ class Dealer extends Play { class ScoreBoard extends Play { _init() { - let _ = this.make(TransText, Vec2.make(0, 0), { + let _ = this.make(TransText, Vec2.make(0, 25), { key: 'score', - center: true, - width: 200, + width: 80, height: 100 }) - this.make(TransText, Vec2.make(0, _.height), { + this.make(TransText, Vec2.make(100, 6), { no_trans: true, key: '1000', - center: true, - width: 200, + width: 180, + height: 100, + color: Color.black + }) + this.make(TransText, Vec2.make(100, 0), { + no_trans: true, + key: '1000', + width: 180, height: 100 }) + } +} + +type OverlayData = { + on_close: () => void +} +class Overlay extends Play { + + get data() { + return this._data as OverlayData + } + + _init() { + + [ + v_random().mul(v_screen), + v_random().mul(v_screen), + v_random().mul(v_screen), + v_random().mul(v_screen), + v_random().mul(v_screen), + v_random().mul(v_screen), + v_random().mul(v_screen), + v_random().mul(v_screen), + v_random().mul(v_screen), + v_random().mul(v_screen), + v_random().mul(v_screen), + ].forEach(v => { + let _ = this.make(Anim, v, { + name: 'swiggle' + }) + _.origin = Vec2.make(600, 400) + _.scale = Vec2.one.scale(0.5 + v_random().x) + if (v_random().y < 0.5) { + _.play('small') + } + _.rotation = v_random().y * Math.PI + }) + let self = this + this.make(Clickable, Vec2.zero, { + rect: Rect.make(0, 0, 1920, 1080), + on_hover() { + return true + }, + on_drag() { + return true + }, + on_click() { + self.data.on_close() + return true + } + }) } } export class SolitairePlay extends Play { + set sidebar_open(v: boolean) { + this.sidebar.open = v + this.overlay.visible = v + } + + hamburger!: Hamburger + sidebar!: SideBar + overlay!: Overlay + _init() { let sidebar: SideBar @@ -666,27 +731,31 @@ export class SolitairePlay extends Play { } }) - this.make(ScoreBoard, Vec2.make(150, 760), { + this.make(ScoreBoard, Vec2.make(16, 860), { }) - - let overlay = this.make(RectView, Vec2.zero, { - w: 1920, - h: 1080, - color: Color.white + let self = this + let overlay = this.make(Overlay, Vec2.zero, { + on_close() { + self.sidebar_open = false + self.hamburger.open = false + } }) - overlay.visible = false - this.make(Hamburger, Vec2.make(2, 2), { - on_click: () => { - sidebar.open = !sidebar.open - overlay.visible = sidebar.open + let hamburger = this.make(Hamburger, Vec2.make(2, 2), { + on_open: (v: boolean) => { + self.sidebar_open = v } }) - sidebar = this.make(SideBar, Vec2.make(-400, 180), { + sidebar = this.make(SideBar, Vec2.make(-600, 180), { }) + this.sidebar = sidebar + this.overlay = overlay + this.hamburger = hamburger + + this.sidebar_open = false } } @@ -694,19 +763,38 @@ export class SolitairePlay extends Play { class SideBar extends Play { - get x() { - return this.open ? 8 : -400 - } + _t_x?: Tween + + _open!: boolean + set open(v: boolean) { + this._open = v + + if (this._t_x) { + this.cancel(this._t_x) + } - open: boolean = false + if (v) { + this._t_x = this.tween([this.position.x, 0], (v) => { + this.position.x = v + }, ticks.sixth, 0, () => { + this._t_x = undefined + }) + } else { + this._t_x = this.tween([this.position.x, -600], (v) => { + this.position.x = v + }, ticks.sixth, 0, () => { + this._t_x = undefined + }) + } + } _init() { + this._open = false - this.make(RectView, Vec2.make(0, 0), { - w: 400, - h: 820, - color: Color.black + let _ = this.make(Anim, Vec2.make(0, -100), { + name: 'side_menu_bg' }) + _.scale = Vec2.make(1.4, 1.4) let x = 20 let y = 60 @@ -742,11 +830,6 @@ class SideBar extends Play { } }) } - - _update() { - this.position.x = appr(this.position.x, this.x, Time.delta * 1000) - } - } @@ -759,11 +842,60 @@ class SideBarItem extends Play { return this._data as SideBarItemData } + _t_color?: Tween + _i_color!: number + + get i_color() { + return this._i_color + } + + set i_color(v: number) { + this._i_color = v + + this.bg.color = Color.lerp(Color.white, Color.hex(0x202431), this._i_color) + this.fg.color = Color.lerp(Color.white, Color.hex(0x202431), 1 - this._i_color) + + } + + + set hover(v: boolean) { + + if (this._t_color) { + this.cancel(this._t_color) + } + + if (v) { + this._t_color = this.tween([this.i_color, 0], (v) => { + this.i_color = v + }, ticks.sixth, 0, () => { + this._t_color = undefined + }) + } else { + this._t_color = this.tween([this.i_color, 1], (v) => { + this.i_color = v + }, ticks.sixth, 0, () => { + this._t_color = undefined + }) + } + } + + bg!: RectView + fg!: TransText + _init() { - this.make(TransText, Vec2.make(0, 0), { + + this._i_color = 0 + this.bg = this.make(RectView, Vec2.make(-20, -40), { + w: 412, + h: 120, + color: Color.hex(0x202431) + }) + + this.fg = this.make(TransText, Vec2.make(0, 0), { key: this.data.text, width: 350, - height: 100 + height: 100, + color: Color.white }) @@ -772,25 +904,26 @@ class SideBarItem extends Play { let self = this - this.make(Clickable, Vec2.make(0, 0), { + this.make(Clickable, Vec2.make(-20, -40), { rect: Rect.make(0, 0, w, h), on_hover() { + self.hover = true }, on_hover_end() { + self.hover = false }, on_click() { self.data.on_click() + return true } }) - - } } type HamburgerData = { - on_click: () => void + on_open: (v: boolean) => void } class Hamburger extends Play { @@ -799,11 +932,28 @@ class Hamburger extends Play { return this._data as HamburgerData } + _open!: boolean + + set open(v: boolean) { + this._open = v + if (this._open) { + this.anim.play('open') + } else { + this.anim.play('idle') + } + this.data.on_open(v) + } + + anim!: Anim + _init() { - this.make(Anim, Vec2.make(0, 0), { - name: 'menu_bar' + this._open = false + + let anim = this.make(Anim, Vec2.make(0, 0), { + name: 'hmg_bg' }) + this.anim =anim let w = 200, @@ -814,11 +964,15 @@ class Hamburger extends Play { this.make(Clickable, Vec2.make(20, 20), { rect: Rect.make(0, 0, w, h), on_hover() { + anim.play(self._open ? 'open_hover':'hover') }, on_hover_end() { + anim.play(self._open ? 'open':'idle') }, on_click() { - self.data.on_click() + self.open = !self._open + + return true } })