Skip to content

Commit a6bfb38

Browse files
modified tris
1 parent f0078d0 commit a6bfb38

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tool/rlc/test/tris.rl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,21 @@ fun three_in_a_line_player(Board b, Int player_id) -> Bool:
4343
return false
4444

4545
act play():
46-
let b : Board
47-
while !full(b):
46+
let board : Board
47+
while !full(board):
4848
act mark(Int x, Int y)
4949
req x < 3
5050
req x >= 0
5151
req y < 3
5252
req y >= 0
53-
req b.get(x, y) == 0
53+
req board.get(x, y) == 0
5454

55-
b.set(x, y, int(b.playerTurn) + 1)
55+
board.set(x, y, int(board.playerTurn) + 1)
5656

57-
if b.three_in_a_line_player(int(b.playerTurn) + 1):
57+
if board.three_in_a_line_player(int(board.playerTurn) + 1):
5858
return
5959

60-
b.playerTurn = !b.playerTurn
60+
board.playerTurn = !board.playerTurn
6161

6262
fun main() -> Int:
6363
let game = play()
@@ -66,4 +66,4 @@ fun main() -> Int:
6666
game.mark(1, 1)
6767
game.mark(2, 0)
6868
game.mark(2, 2)
69-
return int(game.b.three_in_a_line_player(1)) - 1
69+
return int(game.board.three_in_a_line_player(1)) - 1

0 commit comments

Comments
 (0)