Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PLEASE HELP WRITE THE CODE IN C LANGUAGE . ADD COMMENTS PLEASE. THANKS. (preferable using microsoft visual studio.) Intro to C- Assignment 6 Tic-Tac-Toe Variant
PLEASE HELP WRITE THE CODE IN C LANGUAGE. ADD COMMENTS PLEASE. THANKS. (preferable using microsoft visual studio.)
Intro to C- Assignment 6 Tic-Tac-Toe Variant Your assignment is to create a Tic-Tac-Toe game where you can either play against the computer or against another player. However, this is not normal Tic-Tac-Toe! This variant is a smaller version of a game called "Order and Chaos". In this, one player is "Order", who wins if a row/column/diagonal of X's or O's is complete. The other player is "Chaos", who wins if every space is taken up without Order winning (so the game cannot tie, unlike normal Tic-Tac-Toe). Both players can play either X or O on their turrn On a 3 by 3 grid aiming for 3 in a row, this would be a very easy game. Typically it's played on a 6x6 grid where a win for Order is 5 pieces in a row. To simplify things, we will use a 5 by 5 grid with 4 in a row to win. Your program must: Allow the user to choose if they're playing against another human or another player Allow the player(s) to choose if they are playing as Order or Chaos Create a 5 by 5 grid Have the players take turns in the game The players should be prevented from playing any invalid moves The computer player does not need any complex Al (playing random valid moves is acceptable) Detect win conditions and end the game by telling the player who won o o o Order wins if there are 4 pieces in a row/column/diagonal Chaos wins if the board is full and Order did not win - 5% of the grade will be removed for each day the assignment is late (up to 30%). If you have extenuating circumstances and need an extension, please contact me before the due date. Please submit your main.c file as [YOUR NAMEL assignment6.c, and include the honor code with your submission Intro to C- Assignment 6 Tic-Tac-Toe Variant Your assignment is to create a Tic-Tac-Toe game where you can either play against the computer or against another player. However, this is not normal Tic-Tac-Toe! This variant is a smaller version of a game called "Order and Chaos". In this, one player is "Order", who wins if a row/column/diagonal of X's or O's is complete. The other player is "Chaos", who wins if every space is taken up without Order winning (so the game cannot tie, unlike normal Tic-Tac-Toe). Both players can play either X or O on their turrn On a 3 by 3 grid aiming for 3 in a row, this would be a very easy game. Typically it's played on a 6x6 grid where a win for Order is 5 pieces in a row. To simplify things, we will use a 5 by 5 grid with 4 in a row to win. Your program must: Allow the user to choose if they're playing against another human or another player Allow the player(s) to choose if they are playing as Order or Chaos Create a 5 by 5 grid Have the players take turns in the game The players should be prevented from playing any invalid moves The computer player does not need any complex Al (playing random valid moves is acceptable) Detect win conditions and end the game by telling the player who won o o o Order wins if there are 4 pieces in a row/column/diagonal Chaos wins if the board is full and Order did not win - 5% of the grade will be removed for each day the assignment is late (up to 30%). If you have extenuating circumstances and need an extension, please contact me before the due date. Please submit your main.c file as [YOUR NAMEL assignment6.c, and include the honor code with your submissionStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started