Show
Ignore:
Timestamp:
07/01/09 05:20:04 (5 months ago)
Author:
sukyoungryu
Message:

[demos] Fixed demos/newtictactoe.fss to bail out when an exception occurs.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/ProjectFortress/demos/newtictactoe.fss

    r3900 r3910  
    191191    name = readLine() 
    192192    println "What size board?" 
    193     N = strToInt(readLine()) 
    194     while playGame(name, N) do 
    195         println "" 
     193    try 
     194        N = strToInt(readLine()) 
     195        while playGame(name, N) do 
     196            println "" 
     197        end 
     198    catch e 
     199        IndexOutOfBounds[\ZZ32\] => 
     200            println "Invalid response." 
    196201    end 
    197202    println "Bye!"