package Ġcom . an ap lan . engineering . az uki . t ict act oe . dsl Ċ Ċ import Ġcom . an ap lan . engineering . az uki . core . dsl . Given Ċ import Ġcom . an ap lan . engineering . az uki . core . system . Action Ċ import Ġcom . an ap lan . engineering . az uki . t ict act oe . adapter . api . T ic T ac To e Action Factory Ċ import Ġcom . an ap lan . engineering . az uki . t ict act oe . dsl . ascii . T ic T ac To e Board Ascii Ċ Ċ class ĠT ic T ac To e Given ( private Ġval Ġaction Factory : ĠT ic T ac To e Action Factory ): ĠGiven < T ic T ac To e Action Factory > Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġaction List Ġ= Ġmutable ListOf < Action >() ĊĊĠĠĠ Ġfun Ġthere Is AP lay Order ( order Name : ĠString , Ġvar arg Ġplayers : ĠString ) Ġ{ ĊĠĠĠĠĠĠĠ Ġaction List . add ( action Factory . play Order . create ( order Name , Ġplayers . toList ())) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġthere Is AN ew Game ( game Name : ĠString , Ġorder Name : ĠString ) Ġ{ ĊĠĠĠĠĠĠĠ Ġaction List . add ( action Factory . game . start ( game Name , Ġorder Name )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġthere Is AN ew Game With Players ( game Name : ĠString , Ġvar arg Ġplayers : ĠString ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġorder Name Ġ= Ġ"${ game Name }_ ORDER " ĊĠĠĠĠĠĠĠ Ġthere Is AP lay Order ( order Name , Ġ* players ) ĊĠĠĠĠĠĠĠ Ġthere Is AN ew Game ( game Name , Ġorder Name ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġthere Is AN ew Game ( game Name : ĠString ) Ġ{ ĊĠĠĠĠĠĠĠ Ġthere Is AN ew Game With Players ( game Name , Ġ" X ", Ġ" O ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġthere Is AG ame ( game Name : ĠString , Ġorder Name : ĠString , Ġboard Data : ĠString ) Ġ{ ĊĠĠĠĠĠĠĠ Ġthere Is AN ew Game ( game Name , Ġorder Name ) ĊĠĠĠĠĠĠĠ ĠT ic T ac To e Board Ascii . parse ( board Data ). forEach Ġ{ Ġ( position , Ġplayer Name ) Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġaction List . add ( action Factory . game . move ( game Name , Ġplayer Name , Ġposition )) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġthere Is AG ame ( game Name : ĠString , Ġboard Data : ĠString ) Ġ{ ĊĠĠĠĠĠĠĠ Ġthere Is AN ew Game ( game Name ) ĊĠĠĠĠĠĠĠ ĠT ic T ac To e Board Ascii . parse ( board Data ). forEach Ġ{ Ġ( position , Ġplayer Name ) Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġaction List . add ( action Factory . game . move ( game Name , Ġplayer Name , Ġposition )) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġactions (): ĠList < Action > Ġ= Ġaction List Ċ Ċ } Ċ