Skip to content

Commit 664e66e

Browse files
author
Admiral Adama
committed
CLARITY - renamed value to rank
1 parent 1e08284 commit 664e66e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

models/ChessBoard.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,8 @@ function square_is_occupied($square) {
438438
}
439439

440440
function get_king_square($color) {
441-
foreach ( $this->board as $value ) {
442-
foreach ( $value as $piece ) {
441+
foreach ( $this->board as $rank ) {
442+
foreach ( $rank as $piece ) {
443443
if ( $piece ) {
444444
if ( $piece->type == ChessPiece::KING && $piece->color == $color ) {
445445
return $piece->square;

0 commit comments

Comments
 (0)