| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -25,16 +25,15 @@ def main() -> None: | |||
| 25 | 25 | ||
| 26 | 26 | if state.error: | |
| 27 | 27 | print(state.error) | |
| 28 | + elif state.winner: | ||
| 29 | + print(f'{state.winner} has won!') | ||
| 30 | + break | ||
| 28 | 31 | ||
| 29 | 32 | state = get_move(state) | |
| 30 | 33 | ||
| 31 | 34 | if state.quit: | |
| 32 | 35 | print('You lose, loser!') | |
| 33 | 36 | break | |
| 34 | - elif state.winner: | ||
| 35 | - print(format_board(state.board)) | ||
| 36 | - print(f'{state.winner} has won!') | ||
| 37 | - break | ||
| 38 | 37 | elif state.draw: | |
| 39 | 38 | print("All right, we'll call it a draw.") | |
| 40 | 39 | break | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -30,16 +30,15 @@ def main() -> None: | |||
| 30 | 30 | ||
| 31 | 31 | if state['error']: | |
| 32 | 32 | print(state['error']) | |
| 33 | + elif state['winner']: | ||
| 34 | + print(f"{state['winner']} has won!") | ||
| 35 | + break | ||
| 33 | 36 | ||
| 34 | 37 | state = get_move(state) | |
| 35 | 38 | ||
| 36 | 39 | if state['quit']: | |
| 37 | 40 | print('You lose, loser!') | |
| 38 | 41 | break | |
| 39 | - elif state['winner']: | ||
| 40 | - print(format_board(state['board'])) | ||
| 41 | - print(f"{state['winner']} has won!") | ||
| 42 | - break | ||
| 43 | 42 | elif state['draw']: | |
| 44 | 43 | print('No winner.') | |
| 45 | 44 | break | |
| Back | FazBrowse Home | New Git URL |
0 commit comments