Game starting arrangement functions

The package ppgames contains functions that generate the starting piece arrangements for several piecepack games. These functions return data frames that can be used directly with piecepackr::pmap_piece or ppgames::cat_piece to generate piecepack game diagrams or they can be used with ppgames' Portable Piecepack Notation parser read_ppn to initially setup the game pieces.

Directly generating starting diagrams

The game start functions all return a data frame that can be used directly with piecepackr::pmap_piece or ppgames::cat_piece:

library("ppgames")
cat_piece(df_fide_chess())
Unicode text diagram for Chess
download.file("https://trevorldavis.com/piecepackr/share/demo_cfgs.RData")
cfgs <- new.env()
load("demo_cfgs.RData", envir=cfgs)
pmap_piece(df_fide_chess(), cfg=cfgs$chess5, op_scale=0.5,
           trans=op_transform, default.units="in")
3D diagram for Chess

Use with Portable Piecepack Notation

The game start functions can also be used with Portable Piecepack Notation to initially set the game pieces via the metadata field GameType:

GameType: Four Field Kono

1. b1:b3 1... d3:b3 2. c1:c3 2... a3:c3 3. c2-c1 3... b4:b2 4. a1-b1 4... b3:b1
5. d1:b1 5... c3-c2 6. a2-a3 6... b2:d2 7. a3-b3 7... c4-c3 8. c1-d1 8... d4-d3
9. b1-b2 9... d2:b2 10. b3-a3 10... b2-b1 {Player 1's loss is assured with the
 separation of their two remaining pieces and they should resign in a real game}
11. a3-a2 11... b1-c1 12. d1-d2 12... c1-d1 13. a2-a3 13... a4-b4
14. a3-a4 14... b4-c4 15. a4-b4 15... c4-d4 16. b4-a4 16... d4:d2 {Player 2 wins}
Four Field Kono example

It is also possible to pass in arguments to the game start function by passing a "mapping" to the GameType field:

---
GameType:
  Name: Fujisan
  Coins: "44452n24n3aa/a25335325ann"
...
1. a1-b1 2. n2-k2 3. b1-e1 4. e1-j1 5. j1-j2 6. j2-l2 7. k2-m2
8. m2-m1 9. l2-l1 10. n1-k1 11. m1-i1 12. i1-d1 13. d1-d2 14. l1-i1
15. i1-i2 16. k1-k2 17. k2-e2 18. i2-c2 19. a2-f2 20. e2-h2 21. h2-g2
22. c2-h2 23. h2-h1 24. d2-h2 25. f2-b2 26. b2-b1 27. b1-g1
Animation of a Fuji-san game

In particular for supported games playable with either a piecepack or another game system (like a checkers board) one can inform PPN of the alternative game system to use via a System argument to the GameType field:

---
GameType:
  Name: Four Field Kono
  System: Checkers
...
1. b1:b3 1... d3:b3 2. c1:c3 2... a3:c3 3. c2-c1 3... b4:b2 4. a1-b1 4... b3:b1
5. d1:b1 5... c3-c2 6. a2-a3 6... b2:d2 7. a3-b3 7... c4-c3 8. c1-d1 8... d4-d3
9. b1-b2 9... d2:b2 10. b3-a3 10... b2-b1 {Player 1's loss is assured with the
 separation of their two remaining pieces and they should resign in a real game}
11. a3-a2 11... b1-c1 12. d1-d2 12... c1-d1 13. a2-a3 13... a4-b4
14. a3-a4 14... b4-c4 15. a4-b4 15... c4-d4 16. b4-a4 16... d4:d2 {Player 2 wins}
Four Field Kono example using checkers and a board instead of a piecepack

Supported Game Start Functions

Contained in piecenikr

Please note some Looney Pyramids / piecepack hybrids like Alien City are contained in the ppgames package.

Game Start Functions contained in piecenikr
game df_names comment
Martian Chess df_martian_chess  

Contained in ppgames

Some games supported in ppgames

Some games supported in ppgames

Game Start Functions contained in ppgames
game df_names ruleset comment
Alice Chess df_alice_chess X  
Alien City df_alien_city    
Alquerque df_alquerque X  
Awithlaknannai Mosona df_awithlaknannai_mosona    
Backgammon df_backgammon X  
Breakthrough df_breakthrough    
Cell Management df_cell_management    
Chaturaji df_chaturaji    
(American) Checkers df_american_checkers, df_english_draughts, df_checkers X  
(International) Chess df_international_chess, df_chess X  
Chinese Checkers df_chinese_checkers, df_mini_halma   A mini Halma variant
Cribbage (Board) df_cribbage_board X Just a (piecepack) cribbage board
Coin Collectors df_coin_collectors    
Crossings df_crossings    
Desfases df_desfases    
Easy Slider df_easy_slider    
Evade df_evade    
Everest df_everest    
Four Blind Mice df_four_blind_mice    
Four Field Kono df_four_field_kono X  
Four Seasons Chess df_four_seasons_chess X  
Froggy Bottom df_froggy_bottom    
Fujisan df_fujisan    
Grasshoper df_grasshopper    
Iceberg df_iceberg    
Ice Floe df_ice_floe    
Jul-Gono df_jul_gono    
Landlocked df_landlocked    
Ley Lines df_ley_lines    
Lines of Action df_lines_of_action    
Mathrix df_mathrix    
Nine Men's Morris df_nine_mens_morris X  
Pass the Food df_pass_the_food X  
Piece Gaps df_piece_gaps    
Piece Packing Pirates df_piece_packing_pirates    
Piecepack Klondike df_piecepack_klondike    
Piecepackman df_piecepackman   Currently just the "Roundabout" variant
Plans of Action df_plans_of_action    
Quatri df_quatri    
Rect Board Tiles df_rect_board_tiles   Makes a rectangular board with tiles
Relativity df_relativity    
Salta df_salta    
San Andreas df_san_andreas    
Shogi (Japanese Chess) df_shogi    
Skyscrapers df_skyscrapers    
Slides of Action df_slides_of_action    
Tablut df_tablut X  
The "In" Crowd df_the_in_crowd    
The Magic Bag df_the_magic_bag    
Tower of Babel df_tower_of_babel    
Triactor df_triactor    
Tula df_tula    
Turkish Draughts df_turkish_draughts    
Twelve Men's Morris df_twelve_mens_morris X  
Ultima df_ultima, df_baroque_chess X  
Wormholes df_wormholes    
Xiangqi (Chinese Chess) df_xiangqi X  

Contained in tradgames

Game Start Functions contained in tradgames
game df_names comment
Breakthrough df_breakthrough  
(American) Checkers df_american_checkers  
Crossings df_crossings  
Focus df_focus  
Four-Field Kono df_four_field_kono  
Lines of Action df_lines_of_action  
Turkish Draughts df_turkish_draughts  
## Loading required namespace: systemfonts

Comments


There are no comments yet.

Add a Comment

You can use Markdown or restructuredText to format your comment.

links

social