commands/play.js
/**
         * @brief This function checks if the last 'move' caused the player to
         *        win the game in the fwd diagonal.
         *
         * @return object indicating if the player won ('status') and the
         *                'diagonal' of the winning symbol
         */
@brief This function checks if the last 'move' caused the player to
win the game in the fwd diagonal.

@return object indicating if the player won ('status') and the
'diagonal' of the winning symbol
@brief This function checks if the last ' move ' caused the player to win the game in the fwd diagonal . @return object indicating if the player won ( ' status ' ) and the ' diagonal ' of the winning symbol
function hasWonFwdDiagonal() {
            let i = 0;
            while (i < size) {
                if (board[size * i + i] !== val) {
                    return {status: false};
                }
                i = i + 1;
            }
            return {
                status: true,
                diaognal: 1
            };
        }
function hasWonFwdDiagonal ( ) { let i = 0 ; while ( i < size ) { if ( board [ size * i + i ] !== val ) { return { status : false } ; } i = i + 1 ; } return { status : true , diaognal : 1 } ; }
@brief This function checks if the last 'move' caused the player to
        win the game in the fwd diagonal.
@brief This function checks if the last ' move ' caused the player to win the game in the fwd diagonal .