C Programming Write function checkHorizontal to count how many discs of the  opposing player would be flipped, it should do the following  a. Return type integer  b. Parameter list  i. int row ii. int col  iii. char board[ROW][COL]  iv. char playerChar c. If the square to the left or right is a space, stop checking  d. If the square to the left or right is the same character as the  player’s character, save that it was a flank, stop checking  e. If the square to the left or right is not the same character as the  player’s character, count the disc  f. If the counted discs is greater than zero AND the player found  their own character, return the counted discs, otherwise return  ZERO Write function checkVertical to count how many discs of the opposing  player would be flipped, it should do the following  a. Return type integer  b. Parameter list  i. int row ii. int col  iii. char board[ROW][COL]  iv. char playerChar c. If the square above or below is a space, stop checking  d. If the square above or below is the same character as the player’s  character, save that it was a flank, stop checking  e. If the square above or below is not the same character as the player’s character, count the disc  f. If the counted discs is greater than zero AND the player found  their own character, return the counted discs, otherwise return  ZERO

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

C Programming

Write function checkHorizontal to count how many discs of the 
opposing player would be flipped, it should do the following 
a. Return type integer 
b. Parameter list 
i. int row
ii. int col 
iii. char board[ROW][COL] 
iv. char playerChar
c. If the square to the left or right is a space, stop checking 
d. If the square to the left or right is the same character as the 
player’s character, save that it was a flank, stop checking 
e. If the square to the left or right is not the same character as the 
player’s character, count the disc 
f. If the counted discs is greater than zero AND the player found 
their own character, return the counted discs, otherwise return 
ZERO


Write function checkVertical to count how many discs of the opposing 
player would be flipped, it should do the following 
a. Return type integer 
b. Parameter list 
i. int row
ii. int col 
iii. char board[ROW][COL] 
iv. char playerChar
c. If the square above or below is a space, stop checking 
d. If the square above or below is the same character as the player’s 
character, save that it was a flank, stop checking 
e. If the square above or below is not the same character as the
player’s character, count the disc 
f. If the counted discs is greater than zero AND the player found 
their own character, return the counted discs, otherwise return 
ZERO

| A | B | C | D | E | F | G | H
1
|
I
|
I
I
I
| I
2 |
I
|
3 |
I
| |
|
|
I
| 4 |
I
| x | x | x |
| |
| 5 |
I
|
| x | 0 |
I |
6 |
I |
I I I
|
I
7 |
I
|
| |
8 |
I
|
|
|
I |
| |
|
Transcribed Image Text:| A | B | C | D | E | F | G | H 1 | I | I I I | I 2 | I | 3 | I | | | | I | 4 | I | x | x | x | | | | 5 | I | | x | 0 | I | 6 | I | I I I | I 7 | I | | | 8 | I | | | I | | | |
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 5 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education