Enum support

Rating: No reviews yet
Downloads: 151
Change Set: f6202ebc6366
Released: Sep 22, 2010
Updated: Sep 22, 2010 by ptrelford
Dev status: Alpha Help Icon

Recommended Download

Source Code TickSpec Source
source code, 51K, uploaded Sep 22, 2010 - 77 downloads

Other Available Downloads

Application TickSpec Library
application, 66K, uploaded Sep 22, 2010 - 74 downloads

Release Notes

type Row = top = 0 | middle = 1 | bottom = 2
type Col = left = 0 | middle = 1 | right = 2
let [<Literal>] rowEx = "(top|middle|bottom)"
let [<Literal>] colEx = "(left|middle|right)"

[<When("a player marks (X|O) at {0} {1}", rowEx, colEx)>]
let [<When>] ``a player marks (X|O) at (top|middle|bottom) (left|middle|right)`` 
        (mark:string,row:Row,col:Col) =       
    let y = int row             
    let x = int col        
    Debug.Assert(System.String.IsNullOrEmpty(layout.[y].[x]))
    layout.[y].[x] <- mark 

Reviews for this release

No reviews yet for this release.