~dax/con44

d626627a5441c6b871fd168297932e5d44790949 — bonbon 1 year, 4 months ago ccdf492
Checked for draw in win function
1 files changed, 7 insertions(+), 1 deletions(-)

M con44.go
M con44.go => con44.go +7 -1
@@ 197,5 197,11 @@ func (g Game) checkWin(row, col, curPlayer int) int {
			return curPlayer
		}
	}
	return 0
	for c := 0; c < g.config.Cols; c++ {
		topRow := g.config.Rows - 1
		if g.board[topRow][c][0] == 0 || g.board[topRow][c][1] == 0 {
			return 0 //Not a draw
		}
	}
	return -1 //Draw
}