Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/joker2770/qpiskvork into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Joker2770 committed Aug 19, 2024
2 parents 99c78f4 + 2742064 commit 86871d0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/caro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/**
qpiskvork is another gomoku or renju manager adapting to Windows and Linux systems.
Copyright (C) 2023 Jintao Yang <[email protected]>
Copyright (C) 2023-2024 Jintao Yang <[email protected]>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -50,12 +50,12 @@ bool Caro::findShap(Board *board, const pair<int, int> &p_drt)

while (true)
{
if (STONECOLOR::BLACK == board->getIdxStoneColor(p_drt_idx))
if (board->isPosOutOfBoard(p_drt_idx))
vColor.push_back(3);
else if (STONECOLOR::BLACK == board->getIdxStoneColor(p_drt_idx))
vColor.push_back(1);
else if (STONECOLOR::WHITE == board->getIdxStoneColor(p_drt_idx))
vColor.push_back(2);
else if (board->isPosOutOfBoard(p_drt_idx))
vColor.push_back(3);
else
vColor.push_back(0);

Expand All @@ -70,12 +70,12 @@ bool Caro::findShap(Board *board, const pair<int, int> &p_drt)
p_drt_idx.second = p_idx.second - p_drt.second;
while (true)
{
if (STONECOLOR::BLACK == board->getIdxStoneColor(p_drt_idx))
if (board->isPosOutOfBoard(p_drt_idx))
vColor.push_back(3);
else if (STONECOLOR::BLACK == board->getIdxStoneColor(p_drt_idx))
vColor.push_back(1);
else if (STONECOLOR::WHITE == board->getIdxStoneColor(p_drt_idx))
vColor.push_back(2);
else if (board->isPosOutOfBoard(p_drt_idx))
vColor.push_back(3);
else
vColor.push_back(0);

Expand Down

0 comments on commit 86871d0

Please sign in to comment.