Skip to content

Commit d794159

Browse files
committed
code comment cleanup
1 parent 3f463ac commit d794159

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/Cell.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ const inline sf::Vector2f &Cell::getPos() const
121121
}
122122

123123
/**
124-
* (ONLY FOR PLAYABLE CELLS) Highlight the currently clicked cell with a piece with BLUE
124+
* (ONLY FOR PLAYABLE CELLS) Highlight with BLUE the currently clicked cell with a piece
125125
*/
126126
inline void Cell::highlightActive()
127127
{

src/WsClient.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ using onDeathCallback = std::function<void(std::string_view notice)>;
2727
using onMovePieceCallback = std::function<void(const chk::payload::MovePayload &)>;
2828
// when opponent captures my piece
2929
using onCaptureCallback = std::function<void(const chk::payload::CapturePayload &)>;
30-
// when we got a winner or loser
30+
// when we get a winner or loser
3131
using onWinLoseCallback = std::function<void(std::string_view notice)>;
3232
// CDN address
3333
constexpr auto cloudfront = "https://d1txhef4jwuosv.cloudfront.net/ws_server_locations.json";

src/managers/GameManager.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ void GameManager::handleCapturePiece(const chk::PlayerPtr &hunter, const chk::Pl
163163
this->forcedMoves.clear();
164164
if (isKingBefore == isKingNow)
165165
{
166-
GameManager::identifyTargets(hunter, targetCell);
166+
this->identifyTargets(hunter, targetCell);
167167
}
168168

169169
if (this->forcedMoves.empty())
@@ -226,7 +226,7 @@ bool GameManager::isHunterActive() const
226226
}
227227

228228
/**
229-
* Using cached gameMap, get the PieceId found at this cell_index
229+
* Using cached gameMap, get the piece_id found at this cell
230230
*
231231
* @param cell_idx the clicked cell
232232
* @return positive number or -1 if not found
@@ -242,7 +242,8 @@ short GameManager::getPieceFromCell(const int cell_idx) const
242242

243243
/**
244244
* Match cells to pieces at game launch, using position, and cache it to Hashmap
245-
* @param pieceList vector of all pieces
245+
*
246+
* @param pieceList vector containing all pieces
246247
*/
247248
void GameManager::matchCellsToPieces(const std::vector<chk::PiecePtr> &pieceList)
248249
{
@@ -308,7 +309,6 @@ void chk::GameManager::handleCellTap(const chk::PlayerPtr &hunter, const chk::Pl
308309
if (pieceId != -1)
309310
{
310311
// YES, it has one! VERIFY IF THERE IS ANY PENDING "forced captures".
311-
// If yes, ensure hunter is SELECTED!
312312
if (!this->getForcedMoves().empty() && this->forcedMoves.find(pieceId) == forcedMoves.end())
313313
{
314314
this->showForcedMoves(hunter, cell);
@@ -319,7 +319,7 @@ void chk::GameManager::handleCellTap(const chk::PlayerPtr &hunter, const chk::Pl
319319
{
320320
return;
321321
}
322-
// OTHERWISE, store it in buffer (for a SIMPLE/CAPTURE move next)!
322+
// Store it in buffer (for a SIMPLE/CAPTURE move next!)
323323
buffer.addItem(pieceId);
324324
this->setSourceCell(cell->getIndex());
325325
cell->highlightActive();
@@ -418,7 +418,7 @@ bool GameManager::awayFromEdge(const int cell_idx) const
418418
/**
419419
* Collect all possible next "forced captures" for this hunter.
420420
* @param hunter Current player
421-
* @param singleCell if not NULL, only collect around this cell. Otherwise, loop ENTIRE board
421+
* @param singleCell if NOT null, then only collect around this cell. Otherwise, loop ENTIRE board
422422
*/
423423
void GameManager::identifyTargets(const PlayerPtr &hunter, const chk::Block &singleCell)
424424
{
@@ -429,7 +429,7 @@ void GameManager::identifyTargets(const PlayerPtr &hunter, const chk::Block &sin
429429
const short pieceId = this->getPieceFromCell(singleCell->getIndex());
430430
if (gameMap.find(singleCell->getIndex()) == gameMap.end() || !hunter->hasThisPiece(pieceId))
431431
{
432-
// this CELL is not usable, OR piece not OWNED by hunter
432+
// this CELL is not usable, OR piece not owned to hunter
433433
return;
434434
}
435435
this->collectFrontLHS(hunter, singleCell);

0 commit comments

Comments
 (0)