Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

This lab looks at defining a multidimensional array type and some helper subprograms for writing a TicTacToe program. Note that...

This lab looks at defining a multidimensional array type and some helper subprograms for writing a TicTacToe program. Note that this is somewhere between a regular lab and a programming assignment. It will be graded accordingly.

For this lab you are allowed, but not required, to do pair programming where two students work on the program together. If you do this, please submit one (1) printout and one (1) uploaded file with both of your names on it. You are expected to both contribute to the program and to take turns typing in the content.

Due: Wednesday, May 3, 2017

  1. Open the following link: TTTLab.adb Save the file as Y:\Ada\TTTLab.adb View the directory listing in Windows Explorer to confirm that the file is now in your Y:\Ada subdirectory. 
  2. Launch AdaGIDE. Open the file you just created, Y:\Ada\TTTLab.adb. 
  3. The code is an Ada program that has comments that indicate what its functionality should be. Your task is to:
    1. Implement the body of IsFilled. This function should return true when all board positions have an X or O, and return false otherwise.
    2. Implement the body of DisplayBoard. This procedure should output the TicTacToe board in a nice readable way. You will want to use vertical bars (|) and dashes or underscores to make a grid. When the value of a particular board position is Blank, you will want to output blank spaces (rather than the word Blank). For that reason, you probably do not want to use an enumeration_io package.
    3. (Do the first two before this one) Implement a function (or procedure if you prefer) to determine if a player has won the game according to the standard rules of TicTacToe. Don't forget about diagonals. Modify the main program loop to stop either when there is a winner or when the board is full. Report the winner.
Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question