- Test-Driven Java Development(Second Edition)
- Alex Garcia Viktor Farcic
- 73字
- 2021-06-24 18:31:55
Implementation
This implementation should be similar to the previous one. We already have horizontal verification and now we need to do the same vertically:
private boolean isWin() { int playerTotal = lastPlayer * 3; for (int i = 0; i < SIZE; i++) { if (board[0][i] + board[1][i] + board[2][i] == playerTotal) { return true; } else if (board[i][0] + board[i][1] + board[i][2] == playerTotal) { return true; } } return false; }
推薦閱讀
- INSTANT Mock Testing with PowerMock
- C語言程序設計實踐教程(第2版)
- 基于粒計算模型的圖像處理
- C語言程序設計(第2 版)
- SpringMVC+MyBatis快速開發與項目實戰
- Dependency Injection in .NET Core 2.0
- Python 3破冰人工智能:從入門到實戰
- Python貝葉斯分析(第2版)
- 3D少兒游戲編程(原書第2版)
- Processing創意編程指南
- Visual Basic 6.0程序設計實驗教程
- 深度學習入門:基于Python的理論與實現
- 3D Printing Designs:Octopus Pencil Holder
- Wearable:Tech Projects with the Raspberry Pi Zero
- Flutter之旅