Difference between revisions of "CSC111 Final Exam 2015"
Line 3: | Line 3: | ||
=Problem 1= | =Problem 1= | ||
<br /> | <br /> | ||
− | We have seen in class how write code that creates an 8x8 checkerboard, and positions checkers on the board. We have seen how we can move the checkers from one cell to another, but the program we wrote allows any kind of moves the user indicates, whether they are legal or not. | + | We have seen in class how to write code that creates an 8x8 checkerboard, and positions checkers on the board. We have seen how we can move the checkers from one cell to another, but the program we wrote allows any kind of moves the user indicates, whether they are legal or not. |
− | Your assignment is to write a program that, given the current position of a piece and its color, and the position picked by the user, will determine if the move is valid or not. Your program will not use the graphics library. We are simply interested in figuring out how to determine if a move is legal or not | + | Your assignment is to write a program that, given the current position of a piece and its color, and the position picked by the user, will determine if the move is valid or not. Your program will '''not use''' the graphics library. We are simply interested in figuring out how to determine if a move is legal or not. |
− | |||
− | |||
+ | Your program will read a text file containing the description of the move proposed by the user, and a description of the location of all the checkers pieces are on the board. Your program will then output just one line of text containing the either "legal" or "not legal". | ||
+ | <br /> | ||
=Problem 2: Frogger= | =Problem 2: Frogger= | ||
<br /> | <br /> | ||
Line 156: | Line 156: | ||
<br /> | <br /> | ||
+ | ==Submission== | ||
<br /> | <br /> | ||
+ | * Submit your program in the Final Problem 3 section. | ||
<br /> | <br /> | ||
<br /> | <br /> |