\ fourtap-game-type  2001/12/22 KDJ

\ Copyright 2001
\ Kristopher D. Johnson
\ 
\ THIS CODE IS PROVIDED "AS IS"
\ WITHOUT WARRANTY OF ANY KIND.
\ THE AUTHOR SHALL NOT BE LIABLE
\ FOR ANY CLAIM IN CONNECTION
\ WITH THIS CODE.
\ 
\ This code may be used, copied,
\ modified, or distributed for any
\ purpose, provided that the above
\ copyright notice and disclaimer of
\ warranty is retained on all copies.

needs ondo
needs fourtap-resources

.( fourtap-game-type... )

: init-2x2 ( -- 4 )
  frm2x2 ShowForm  4 ;

: init-3x3 ( -- 9 )
  frm3x3 ShowForm  9 ;

: init-4x4 ( -- 16 )
  frm4x4 ShowForm  16 ;

: (init-game-type) ( type -- type #btns )
  on: start2x2 do: init-2x2
  on: start3x3 do: init-3x3
  on: start4x4 do: init-4x4
  true abort" Unknown game type" ;

: init-game-type ( type -- #btns )
  (init-game-type) nip ;

: (restore-game-type)
  on: 4 do: init-2x2
  on: 9 do: init-3x3
  on: 16 do: init-4x4
  true abort" Unknown #btns" ;

: restore-game-type ( #btns -- )
  (restore-game-type) 2drop ;


