program main !*****************************************************************************80 ! !! snakes_and_ladders_simulation_test() tests snakes_and_ladders_simulation(). ! ! Licensing: ! ! This code is distributed under the MIT license. ! ! Modified: ! ! 16 September 2014 ! ! Author: ! ! John Burkardt ! implicit none integer, parameter :: rk = kind ( 1.0D+00 ) call timestamp ( ) write ( *, '(a)' ) ' ' write ( *, '(a)' ) 'snakes_and_ladders_simulation_test():' write ( *, '(a)' ) ' FORTRAN90 version' write ( *, '(a)' ) ' Test snakes_and_ladders_simulation().' call test01 ( ) ! ! Terminate. ! write ( *, '(a)' ) ' ' write ( *, '(a)' ) 'snakes_and_ladders_simulation_test()' write ( *, '(a)' ) ' Normal end of execution.' write ( *, '(a)' ) ' ' call timestamp ( ) stop 0 end subroutine test01 ( ) !*****************************************************************************80 ! !! TEST01 tests SPY_GE for the SNAKES matrix. ! ! Licensing: ! ! This code is distributed under the MIT license. ! ! Modified: ! ! 16 September 2014 ! ! Author: ! ! John Burkardt ! implicit none integer, parameter :: rk = kind ( 1.0D+00 ) real ( kind = rk ) a(0:100,0:100) character ( len = 255 ) header integer m integer n write ( *, '(a)' ) ' ' write ( *, '(a)' ) 'TEST01' write ( *, '(a)' ) ' SNAKES sets up the snakes and ladders matrix.' write ( *, '(a)' ) ' SPY_GE generates a sparsity plot for a matrix stored' write ( *, '(a)' ) ' in general (GE) format.' call snakes ( a ) header = 'snakes' m = 101 n = 101 call spy_ge ( m, n, a, header ) return end