Tic-Tac-Toe FORTRAN 90 CODE Create an interactive Tic-Tac-Toe game for two players as a Fortran 90 Program So let’s get started! Part 1: Your Tic-Tac-Toe game! You love playing tic-tac-toe, So, you...




Tic-Tac-Toe


FORTRAN 90 CODE


Create an interactive Tic-Tac-Toe game for two players as a
Fortran 90
Program


So let’s get started!


Part 1: Your Tic-Tac-Toe game!


You love playing tic-tac-toe, So, you decide to create your own that you can play against your friends.

This will be a standard tic-tac-toe game with X’s and O’s where the players alternate taking turns placing their tokens (i.e., X or O, depending on which one they are). It will include:

1. Standard 3 x 3 playing board (required: use 2D arrays)

2. A winning game is either:

• 3 across

• 3 up and down

• 3 diagonally

3. Tie games are possible if a winning game is not achieved.

4. The game board with associated placement of the played X’s and O’s must be displayed after each turn.


Program Flow:





1. First, ask the user for their name and welcome them.

2. Then randomly decide who will go first, the 1st user or 2nd User (and let the users know their tokens X or O)

3. The 1st and 2nd users will alternate turns placing their tokens.

• The user should be asked where they want to place their token

• The computer should be asked to randomly choose an empty spot

4. The game ends when either a winning game occurs (see above) or all the spots are filled.

5. At the end of the game, ask the user if they would like to play again.


Input Option:


There are numerous options for getting input from users to indicate where they want their token placed.


-Ask them to give you the column and row number of their desired spot.


May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here