From: Kevin Worth <kevin@theworths.org>
Date: Thu, 15 Dec 2005 07:07:46 +0000 (+0000)
Subject: Kevin learning C maintenance
X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=7768c01e9aeec334dd3d5851fc2d1298317060dc;p=ttt

Kevin learning C maintenance
---

diff --git a/src/test-board.c b/src/test-board.c
index 104395e..89af871 100644
--- a/src/test-board.c
+++ b/src/test-board.c
@@ -7,6 +7,7 @@ main (void)
 {
     ttt_board_t board;
     int m, i, newline;
+    ttt_cell_t winner;
     
     ttt_board_init (&board);
     
@@ -21,13 +22,13 @@ main (void)
 	m = m - '0';
 	if (ttt_board_make_move (&board, m) == TTT_ERROR_NOT_VALID_MOVE)
 	    continue;
-	ttt_board_is_won (&board);
-	if (ttt_board_is_won (&board) == TTT_CELL_X)
+	winner = ttt_board_is_won (&board);
+	if (winner == TTT_CELL_X)
 	{
 	    printf ("X's Win! ");
 	    break;
 	}
-	else if (ttt_board_is_won (&board) == TTT_CELL_O)
+	else if (winner == TTT_CELL_O)
 	{
 	    printf ("O's Win! ");
 	    break;