File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -43,21 +43,21 @@ fun three_in_a_line_player(Board b, Int player_id) -> Bool:
43
43
return false
44
44
45
45
act play():
46
- let b : Board
47
- while !full(b ):
46
+ let board : Board
47
+ while !full(board ):
48
48
act mark(Int x, Int y)
49
49
req x < 3
50
50
req x >= 0
51
51
req y < 3
52
52
req y >= 0
53
- req b .get(x, y) == 0
53
+ req board .get(x, y) == 0
54
54
55
- b .set(x, y, int(b .playerTurn) + 1)
55
+ board .set(x, y, int(board .playerTurn) + 1)
56
56
57
- if b .three_in_a_line_player(int(b .playerTurn) + 1):
57
+ if board .three_in_a_line_player(int(board .playerTurn) + 1):
58
58
return
59
59
60
- b .playerTurn = !b .playerTurn
60
+ board .playerTurn = !board .playerTurn
61
61
62
62
fun main() -> Int:
63
63
let game = play()
@@ -66,4 +66,4 @@ fun main() -> Int:
66
66
game.mark(1, 1)
67
67
game.mark(2, 0)
68
68
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
You can’t perform that action at this time.
0 commit comments