So I have an assignment where I have to recreate a 3d chessboard that is a RxC grid of squares each being a different height. If the chessboard is water tight, and someone pours
This is going to take more than simply calculating volume.
According to the examples you posted, you have test for containment first, then worry about the volume of the container.
I suggest determining whether or not there is a closed polygon in the board.
If the polygon is closed, determine its area.
The height used for volume calculation will be the minimum height of all the bounding walls.
Finally, the volume will be the minimal height multiplied by the area of the polygon.
Research on the web for algorithms on determining a closed polygon based on a vector of vertices or line segments.