ticTacToe.rho  

  RSS

dckc
 dckc
(@dckc)
Member Moderator
Joined:6 months  ago
Posts: 20
14/08/2018 7:34 am  

It's still pretty tedious, but I'm starting to get the hang of this...

https://github.com/dckc/RChain-API/blob/games/fun/ticTacToe.rho

rholang $ @"ticTacToe"!("game2")

@{"X starts"}

rholang $ for (@(X, O) <- @"game2") { for(@"go", _, where <- @X) { where!(0, 0) } }

@{["turn:", "X", (0, 0), {"O" : Set(), "X" : Set()}]}
@{["O", "'s turn. board:", {"O" : Set(), "X" : Set((0, 0))}]}

and so on

 


ReplyQuote
  
Working

Please Login or Register