Demo Project 2 Milestone 1

Demo Project 2 Milestone 1

You cannot submit for this problem because the homework's deadline is due.

Submit board.c only here. Comment those functions that you didn't implement.

We will be working on Demo Project 2 through Lab 7 to Lab 9. You may download the source code file from labs/dp2/m{i}_skeleton for milestone \(i\). Official updates to the project description file will be posted on Piazza.

Milestone 1

In this milestone, you should implement those functions related to basic operations on the board. Namely, implement the following functions (in board.c):

  • initBoard
  • isBlank
  • isinBoard
  • isoppo
  • countBoard
  • printBoard

For printBoard, you should get something like below:

   a   b   c   d   e   f   g   h
 +---+---+---+---+---+---+---+---+
1|   |   |   |   |   |   |   |   |
 +---+---+---+---+---+---+---+---+
2|   |   |   |   |   |   |   |   |
 +---+---+---+---+---+---+---+---+
3|   |   |   | ` |   |   |   |   |
 +---+---+---+---+---+---+---+---+
4|   |   | ` | O | X |   |   |   |
 +---+---+---+---+---+---+---+---+
5|   |   |   | X | O | ` |   |   |
 +---+---+---+---+---+---+---+---+
6|   |   |   |   | ` |   |   |   |
 +---+---+---+---+---+---+---+---+
7|   |   |   |   |   |   |   |   |
 +---+---+---+---+---+---+---+---+
8|   |   |   |   |   |   |   |   |
 +---+---+---+---+---+---+---+---+
Black (X) Counts: 2
White (O) Counts: 2
====================================

Here ` stands for the positions that next disk could be put. If you can, try to print them in color! But this is not required.

Lab 7 Exercises

Not Claimed
Status
Finished
Problems
4
Open Since
2022-06-30 18:15
DDL
2022-07-01 23:59
Extension
0.0 hour(s)